first commit
This commit is contained in:
1
services/articles/.pydio
Normal file
1
services/articles/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
60e2194b-a66a-4ee3-9ff8-32721f809a26
|
||||
23
services/articles/index.js
Normal file
23
services/articles/index.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const express = require('express')
|
||||
const app = express()
|
||||
const port = 3003
|
||||
|
||||
app.get('/articles/list', (req, res) => {
|
||||
res.json({
|
||||
code: 200,
|
||||
message: '文章服务'
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
app.get('/articles/health', (req, res) => {
|
||||
res.end('OK!');
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`articles service run http://127.0.0.1:${port}`)
|
||||
})
|
||||
15
services/articles/package.json
Normal file
15
services/articles/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "articles",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "node-dev index.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"express": "^4.18.2"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user