Skip to content

Commit a0785ae

Browse files
author
Jerry
committed
add a very simple static server.
1 parent 9a892d5 commit a0785ae

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

app.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* 访问静态网页服务器
3+
*/
4+
// 引入需要的模块
5+
var express = require('express')
6+
7+
// 设置端口值
8+
var port = 8082
9+
10+
var app = express()
11+
12+
app.use(express.static('docs'))
13+
14+
app.listen(port)
15+
console.log('Serving at localhost:' + port)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Vue-CNode",
3-
"version": "1.0.0",
3+
"version": "0.3.0",
44
"description": "A Vue.js project of CNode.",
55
"author": "Jerry <327538014@qq.ocm>",
66
"private": true,

0 commit comments

Comments
 (0)