一:npm install connect会出现错误:解决方法
1:$ npm install [email protected]
2:$ npm install serve-static;
建立server.js
var connect = require(‘connect‘), serveStatic = require(‘serve-static‘); var app = connect(); app.use(serveStatic("angularjs")); app.listen(5000);
(书中是../angularjs会报错)
详细见:http://stackoverflow.com/questions/25457122/cannot-get-test-html-when-running-node-js-server
时间: 2024-10-10 23:41:36