Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
node-devlop-rest-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhouzihao
node-devlop-rest-api
Commits
7fd4a0a9
Commit
7fd4a0a9
authored
Mar 25, 2020
by
zhouzihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev-add config interface
parent
fa38b266
Pipeline
#112
failed with stages
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
README.md
README.md
+4
-0
api/configApi.js
api/configApi.js
+6
-0
route.js
route.js
+6
-1
No files found.
README.md
View file @
7fd4a0a9
# devlop rest api
## 启动时要一个安装了ssh git的node镜像
-
ssh
-
git
-
curl
-
node or need pm2?
api/configApi.js
0 → 100644
View file @
7fd4a0a9
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
route.js
View file @
7fd4a0a9
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment