代码改变世界

Yeoman+Express+Angular在Linux上开发配置方法

2013-08-17 23:57  NicolasZhang  阅读(471)  评论(0编辑  收藏  举报
  1. $mkdir ExpressWithAngularTest
  2. $cd ExpressWithAngularTest
  3. choose needed components you'd like to add to your project
  4. $mv package.json package_yo.json
  5. $express
  6. $gedit package.json
  7. copy "express": "3.3.4","jade": "*" from the dependencies
  8. $gedit package_yo.json
  9. add a coma after the grunt-karma line in dependencies
  10. paste and save
  11. $rm app.js~ package.json package.json~
  12. $mv package_yo.json package.json
  13. $rm -rf public
  14. $gedit app.js
  15. Change this line:
    app.use(express.static(path.join(__dirname,'public')));

    to this:

    app.use(express.static(path.join(__dirname, 'app')));
  16. $npm install
  17. $node app