Livid
280.84D
557.15D
V2EX  ›  Node.js

关于 Node.js 项目的代码组织方式,推荐一个值得学习的项目吧?

  •  
  •   Livid ·
    PRO
    · Sep 4, 2013 · 9196 views
    This topic created in 4648 days ago, the information mentioned may be changed or developed.
    17 replies    1970-01-01 08:00:00 +08:00
    ijse
        1
    ijse  
       Sep 4, 2013   ❤️ 1
    最近也在想这个,grunt-init-node 可以生成一个基本的框架

    另外,有关网站的,在网上有找到这个: https://github.com/jifeng/node-app 有些可借鉴学习的。
    ywencn
        2
    ywencn  
       Sep 4, 2013
    我一直是按着rails的路子来的。。。
    Numbcoder
        3
    Numbcoder  
       Sep 4, 2013   ❤️ 4
    如果是 web 项目的话,可以参考这个 https://github.com/madhums/node-express-mongoose-demo
    其他的项目,参考 npm 包的格式,`npm init`
    zhttty
        4
    zhttty  
       Sep 4, 2013
    |--package.json
    |--app.js
    |--README.md
    |--config.js
    |--path
    |---bin
    |--*.sh
    |--*.bin
    |--*.js
    |--...
    |---lib
    |---view
    |---main
    |---css
    |---js
    |---doc
    |---man
    |---others
    |---licenses
    |---test
    |---demo
    |---debug
    zhttty
        5
    zhttty  
       Sep 4, 2013
    [email protected]:kellyschurz/nodejsTemplate.git

    4L竟然忽略了首空格...
    xinyu198736
        6
    xinyu198736  
       Sep 4, 2013
    推荐个自己的项目:https://github.com/xinyu198736/htmljs
    只看看代码就好了,没有配置文件,这个项目clone下来跑不起来。
    whuhacker
        7
    whuhacker  
       Sep 4, 2013
    spark
        8
    spark  
       Sep 4, 2013
    试试 Yeoman
    G2bN4dbX9J3ncp0r
        9
    G2bN4dbX9J3ncp0r  
       Sep 4, 2013
    summic
        10
    summic  
       Sep 4, 2013
    @whuhacker nodeclub 的 eventproxy 看得我蛋疼啊
    robertlyc
        11
    robertlyc  
       Sep 4, 2013
    一般按照rails的方式来
    willerce
        13
    willerce  
       Sep 4, 2013
    如果是WEB项目,可以参考 http://sailsjs.org/ 这个框架。

    Sails.js make it easy to build custom, enterprise-grade Node.js apps. It is designed to mimic the MVC pattern of frameworks like Ruby on Rails,
    hfcorriez
        14
    hfcorriez  
       Sep 4, 2013
    推荐 mean.io和yeoman
    ijse
        15
    ijse  
       Sep 5, 2013
    @sxd 这个貌似好久没更新了,看到所用到的一些包版本都很低。。
    sxd
        16
    sxd  
       Sep 5, 2013
    @ijse 推荐是因为他是 jetbrain 的默认模板 应该有其优点才会被默认吧.
    agassi_yzh
        17
    agassi_yzh  
       Sep 5, 2013
    yeoman生成一个
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1354 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 23:55 · PVG 07:55 · LAX 16:55 · JFK 19:55
    ♥ Do have faith in what you're doing.