Commit 7fd4a0a9 authored by zhouzihao's avatar zhouzihao

dev-add config interface

parent fa38b266
Pipeline #112 failed with stages
# devlop rest api
## 启动时要一个安装了ssh git的node镜像
- ssh
- git
- curl
- node or need pm2?
var helper = require('../tools/helper');
module.exports = {
listConfigs: helper.listAllBuilder('porject_config', '*', {}),
saveConfig: helper.saveBuilder('project_config', 'config_id'),
};
\ No newline at end of file
var http = require("http");
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
......@@ -7,6 +6,7 @@ var envApi = require("./api/envApi");
var projectApi = require("./api/projectApi");
var metaDataApi = require("./api/metaDataApi");
var buildLogApi = require("./api/buildLogApi");
var configApi = require("./api/configApi");
app.use(bodyParser.json()); // to support JSON-encoded bodies
app.use(bodyParser.urlencoded({ // to support URL-encoded bodies
......@@ -39,6 +39,11 @@ app.post("/meta/", metaDataApi.save);
app.get("/build/log/page", buildLogApi.pageBuildLog);
app.put("/build/log/back", buildLogApi.backCallSuccess);
// project's configs
app.get("/config/", configApi.listConfigs);
app.post("/config/", configApi.saveConfig);
// todo build command !!!
module.exports = app;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment