hello,world!

This commit is contained in:
赵鑫 2022-08-25 14:34:16 +08:00
parent ce813ddab8
commit 83d8f214d5
4 changed files with 1693 additions and 3 deletions

View File

@ -1,3 +1 @@
# fileshare
文件分享服务器
# 文件分享服务器

1659
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

23
package.json Normal file
View File

@ -0,0 +1,23 @@
{
"name": "fileshare",
"version": "0.1.0",
"description": "文件分享服务器",
"main": "server.js",
"scripts": {
"start": "nodemon",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "ssh://git@nas:2222/zhaoxin/fileshare.git"
},
"keywords": [],
"author": "Zhao Xin <7176466@qq.com>",
"license": "MIT",
"dependencies": {
"express": "^4.18.1"
},
"devDependencies": {
"nodemon": "^2.0.19"
}
}

10
server.js Normal file
View File

@ -0,0 +1,10 @@
const express = require('express')
const app = express()
app.get('/', (req, res) => {
res.end('hello, world!')
})
const host = 'localhost'
const port = 3000
const server = app.listen(port, host, () => {
console.log(`server is running at http://${host}:${port}`)
})