初始化express

This commit is contained in:
aixianling
2022-03-29 10:45:14 +08:00
parent afb81d8649
commit 0905e9263c
3 changed files with 34 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/node_modules/
/package-lock.json

11
demo.js Normal file
View File

@@ -0,0 +1,11 @@
const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => {
res.send('Hello World!')
})
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})

21
package.json Normal file
View File

@@ -0,0 +1,21 @@
{
"name": "dvcp-node-service",
"version": "1.0.0",
"description": "node服务端",
"main": "index.js",
"scripts": {
"test": "node demo.js"
},
"repository": {
"type": "git",
"url": "http://git.sinoecare.com/lab/dvcp-node-service.git"
},
"keywords": [
"node",
"js"
],
"author": "kubbo",
"dependencies": {
"express": "^4.17.3"
}
}