socket.io+angular.js+express.js做个聊天应用(一)

node,express开发环境等安装假设已经搞好了。


justhacker@justhacker-ThinkPad-Edge-E440:~/projects/nodejs$ express -e chattingnode

   create : chattingnode
   create : chattingnode/package.json
   create : chattingnode/app.js
   create : chattingnode/public
   create : chattingnode/public/javascripts
   create : chattingnode/public/images
   create : chattingnode/public/stylesheets
   create : chattingnode/public/stylesheets/style.css
   create : chattingnode/routes
   create : chattingnode/routes/index.js
   create : chattingnode/routes/users.js
   create : chattingnode/views
   create : chattingnode/views/index.ejs
   create : chattingnode/views/error.ejs
   create : chattingnode/bin
   create : chattingnode/bin/www

   install dependencies:
     $ cd chattingnode && npm install

   run the app:
     $ DEBUG=my-application ./bin/www


接着

<pre name="code" class="java">justhacker@justhacker-ThinkPad-Edge-E440:~/projects/nodejs/chattingnode$ cd chattingnode && npm install


[email protected] node_modules/debug

[email protected] node_modules/static-favicon

[email protected] node_modules/ejs

[email protected] node_modules/morgan
└── [email protected]

[email protected] node_modules/cookie-parser
├── [email protected]
└── [email protected]

[email protected] node_modules/body-parser
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected])

[email protected] node_modules/express
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected])


justhacker@justhacker-ThinkPad-Edge-E440:~/projects/nodejs/chattingnode$ ls
app.js  bin  node_modules  package.json  public  routes  views

justhacker@justhacker-ThinkPad-Edge-E440:~/projects/nodejs/chattingnode$ node ./bin/www
GET / 200 10ms - 207b
GET /stylesheets/style.css 200 6ms - 110b




项目源码地址:https://github.com/edagarli/chattingnode


可关注。之后会不断更新。


socket.io+angular.js+express.js做个聊天应用(一),古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。