当前位置: 首页 > news >正文

珠海专业网站制作公司seo网页推广

珠海专业网站制作公司,seo网页推广,武威建设银行网站,怎么样做短视频一、项目背景 一份代码#xff0c;发布多个小程序。想让技术支持部通过脚本自己获取代码#xff0c;并通过脚本自动提交到客户的小程序后台。他们自行发布。 现已注册第三方平台#xff0c;开发人员通过“开发小程序”上传模板。开发人员把代码上传到模板#xff0c;支持…一、项目背景 一份代码发布多个小程序。想让技术支持部通过脚本自己获取代码并通过脚本自动提交到客户的小程序后台。他们自行发布。 现已注册第三方平台开发人员通过“开发小程序”上传模板。开发人员把代码上传到模板支持人员选择模板进行发布小程序。好像git代码管理也不需要了。 二、主要代码 app.js const express require(express); const fs require(fs); const simpleGit require(simple-git); const cors require(cors); // 引入 cors 模块const app express();const gitUrl xxx; //配置 const branch 5.0.1; const codePath unpackage/dist/build/mp-weixin;// 本地临时文件夹 const tempFolder temp;// 使用 cors 中间件 app.use(cors());//clone项目 app.get(/api/gitClone, (req, res) {simpleGit().clone(gitUrl, tempFolder, [-b, branch], (err, data) {if (err) {console.error(Clone failed:, err);} else {console.log(Clone success);res.json({message: clone成功});// 2. 复制代码到指定路径// 这里可能需要根据你的实际需求使用适当的文件复制方法// 例如使用 fs-extra 库的 copy 方法// 3. 执行特定文件const filePath ${tempFolder}/${codePath}/your-executable-file.js;try {// execSync(node ${filePath}, {// stdio: inherit// });console.log(Execution success);} catch (error) {console.error(Execution failed:, error);}}}); });//git 获取所有分支 app.get(/api/gitBranches, (req, res) {// 获取所有分支simpleGit(tempFolder).branch((err, branchSummary) {console.log(branchSummary: , branchSummary);if (err) {console.error(Error:, err);res.status(500).json({error: Failed to fetch branches});} else {// 将分支信息转换为 JSON 格式并返回const branchesJson {branches: branchSummary.all};// current: 5.0.1, 返回的字段为当前分支//{branches:[5.0.1,remotes/origin/1.0.0,remotes/origin/2.0.0,remotes/origin/2.0.1,remotes/origin/2.0.2,remotes/origin/3.0.0,remotes/origin/4.0.0,remotes/origin/4.1.0,remotes/origin/4.2.0,remotes/origin/4.2.1,remotes/origin/5.0.1,remotes/origin/6.0.0,remotes/origin/master]}res.json(branchesJson);}}); });//git 切换分支 app.get(/api/checkoutBranch, (req, res) {// 获取所有分支simpleGit(tempFolder).checkout(6.0.0, (err) {if (err) {console.error(Error:, err);} else {console.log(Switched to branch 6.0.0);res.json({message: 切换成功});}}); });const branchToPull 6.0.0; // 要拉取的分支名称//git 拉取指定分支代码 app.get(/api/pull, (req, res) {// 获取所有分支// 拉取分支代码simpleGit(tempFolder).pull(origin, branchToPull, (err, update) {if (err) {console.error(Error:, err);res.json({message: 拉取错误});} else if (update update.summary.changes) {console.log(Pulled ${update.summary.changes} changes from branch ${branchToPull});res.json({message: 最新成功});} else {console.log(Already up to date);res.json({message: 已经是最新});}}); });app.listen(8000, () {console.log(Server is running on port 8000); });
http://www.hkea.cn/news/14357506/

相关文章:

  • 外贸零售网站建设做pop网站
  • 图文网站建设樟木头电子网站建设报价
  • 大学网站设计网络营销推广的技巧有哪些
  • 做美食的网站哪个好做面点的网站
  • 做资格核查在哪个网站移动电子商务的概念
  • 网站编辑兼职免费的软件下载安装
  • 公司网站开发招标书电子商务网站建设与管理实务
  • 哪家企业网站建设好建设一个跟京东一样的网站
  • php 快速网站开发简网app工场怎么创app
  • h5网站如何做wordpress 数据库 缓存6
  • 郑州房地产网站建立网站数据库实验报告
  • 做猎头可以在哪些网站注册wordpress 无法安装
  • 郑州专业网站建设价格织梦笑话娱乐网站源码2w数据+36条采集规则
  • 海外网站制作手机app软件下载安装
  • 网站公司成功案例怎么写wordpress定时任务原理
  • wordpress免费网站模板下载地址网建教程
  • 摄影师网站推荐廊坊网站建设兼职
  • 知名营销网站开发成都百度推广公司地址
  • 珠宝购物网站的建设代理公司注册后果严重
  • 网站做优化必须要ftp吗姑苏区网络推广服务
  • 网站外包后百度降权网站建设项目设计报告
  • 网站做跳转付款wordpress 子菜单顺序
  • 广东省建设厅网站wordpress 外贸插件
  • 郑州网站app开发网页基础知识
  • vs做网站登录界面外贸类网站建设
  • 南通做网站的花云在网站的标题上怎么做图标
  • 壶关网站建设做创意美食的视频网站
  • 学做川菜最好的网站wordpress 移动版主题
  • 十大免费视频素材网站合肥seo排名优化
  • 购物网站建设特色高清crm软件价格欧美