You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
317 B
16 lines
317 B
6 years ago
|
/**
|
||
|
* node.js创建web服务器
|
||
|
*/
|
||
|
{
|
||
|
var http = require('http');
|
||
|
var express = require('express');
|
||
|
var app = express();
|
||
|
|
||
|
app.use("/wb", express.static(__dirname));
|
||
|
|
||
|
// 创建服务端
|
||
|
http.createServer(app).listen('3000', function() {
|
||
|
console.log('启动服务器完成');
|
||
|
});
|
||
|
}
|