Giter Club home page Giter Club logo

form5-node-express-mongoose-coffeescript's Introduction

A Node.js skeleton using Express, Mongoose and Coffeescript

Do you find yourself looking around for Node.js conventions and how to structure your Node application? Firstly, this skeleton shows how a Node.js web application can be structured properly. Secondly, it demonstrates how some popular modules that provide basic functionalities for your app can be used.

I haven't been using Node.js for long but here I've gathered some of the good things I have come across on my short journey. Hope this can help you get started.

You can find this demo running on Heroku: http://form5-node-skeleton.herokuapp.com/

Log in using admin/admin to manage users & articles.

Install

Assuming you have Node.js and npm installed, to get started developing using this skeleton, run:

	$ git clone git://github.com/olafurnielsen/form5-node-express-mongoose-coffeescript.git
	$ npm install
	$ bin/devserver

Open http://localhost:3000/ in your browser.

What does this skeleton provide you with?

  • A good way to structure your Express.js application.
  • Object modeling for MongoDB using Mongoose.
  • Passport.js for user authentication.
  • Twitter Bootstrap, to jumpstart your UI development.
  • connect-assets for serving CSS, Javascript and images to the client supporting Coffeescript and LESS on the fly.
  • connect-flash for helpful error/notice messages.
  • connect-mongo for persistent session storage.
  • Coffeescript linting using Grunt.
  • node-dev, an awesome development tool for Node.js that automatically restarts your node process when a script is modified. It also has useful growl notifications:

Screenshot

And much more...

File structure

-app/
  |--controllers/
  |--models/
  |--views/
  |__helpers/ (template helper functions)
-config/
  |--routes.coffee
  |--environment.coffee
  |--passport.coffee (auth config)
  |--express.coffee (express.js config)
  |--middlewares/ (custom middlewares)
-assets/ (Client side assets)
  |--css/ (supports LESS)
  |--js/ (supports Coffescript)
  |--img/
-bin/
  |__devserver (Shell script for firing up node-dev)
--server.js

Inspiration and further reading

This skeleton is heavily based on nodejs-express-mongoose-demo but it uses Coffeescript instead of standard javascript and implements various other modules which I think are really useful when developing an Express.js application.

Madhums - Breaking down app.js file - nodejs, express, mongoose

Stack Overflow - Node.js & Express.js: Breaking up the app.js file

form5-node-express-mongoose-coffeescript's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.