• 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

    
    

    debug@0.7.4 node_modules/debug
    
    static-favicon@1.0.2 node_modules/static-favicon
    
    ejs@0.8.8 node_modules/ejs
    
    morgan@1.0.1 node_modules/morgan
    └── bytes@0.3.0
    
    cookie-parser@1.0.1 node_modules/cookie-parser
    ├── cookie@0.1.0
    └── cookie-signature@1.0.3
    
    body-parser@1.0.2 node_modules/body-parser
    ├── qs@0.6.6
    ├── type-is@1.1.0 (mime@1.2.11)
    └── raw-body@1.1.6 (bytes@1.0.0)
    
    express@4.0.0 node_modules/express
    ├── methods@0.1.0
    ├── utils-merge@1.0.0
    ├── merge-descriptors@0.0.2
    ├── parseurl@1.0.1
    ├── escape-html@1.0.1
    ├── cookie-signature@1.0.3
    ├── range-parser@1.0.0
    ├── qs@0.6.6
    ├── buffer-crc32@0.2.1
    ├── fresh@0.2.2
    ├── cookie@0.1.0
    ├── path-to-regexp@0.1.2
    ├── type-is@1.0.0 (mime@1.2.11)
    ├── send@0.2.0 (mime@1.2.11)
    ├── accepts@1.0.0 (mime@1.2.11, negotiator@0.3.0)
    └── serve-static@1.0.1 (send@0.1.4)
    


    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


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


  • 相关阅读:
    DB2 导入CSV文件
    非归档模式下丢失数据文件,怎么办
    制作U盘操作系统安装盘
    Oracle 发布 NoSQL 数据库
    【转载】VMWare Workstation 支持64位操作系统
    net下多个应用之间的web.config冲突的解决办法(禁止继承)
    \r\n 的真切含义
    VMware虚拟机中调整Linux分区大小手记
    磨刀不光不误切菜功,还能强身健体
    农夫送狼羊白菜过河_题目收集
  • 原文地址:https://www.cnblogs.com/mengfanrong/p/5340076.html
Copyright © 2020-2023  润新知