node-app-scaffold

0.1.0 • Public • Published

Screenshot

This is a simple To-do list Node.js application. There are many like it already. It's meant to be a template for new projects, but should also demonstrate how to structure a loosely coupled Node.js application.

Directory Structure

/app
  /client
    /js
      /controllers
      /models
      /modules
      app.js
    /less
  /config
    development.json
    index.js
    production.json
    test.json
  /server
    /modules
    app.js
  /views
    /templates
    index.jade
/public
  /bower
  /bundled
  /images
/test
  /integration
    /step_definitions
    /tests
  /unit
.bowerrc
.gitattributes
.gitignore
bower.json
Gruntfile.js
LICENSE
package.json
README.md

Running the server

# In Terminal window #1, start redis if it's not already running: 
redis-server
 
# In Terminal window #2: 
npm start

Running the Jasmine tests

npm test

Running the CasperJS integration tests

NODE_ENV=test npm start
grunt integration

Design Notes

In this example, templates are compiled on the server but rendered on the client. Bower is being used for packages that are client-side only (e.g. jQuery, Font Awesome), and npm for packages shared by both server and client (e.g. Lodash).

License

MIT. Copyright © 2014 Andrew Childs

Readme

Keywords

none

Package Sidebar

Install

npm i node-app-scaffold

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • andrewchilds