If you’re building a web project using NodeJS, there are plenty of ways to start. I have a one-line method to generate project scaffolding that I use for every website that I build using Node.
I’ve been creating a bunch of websites running on NodeJS lately, and have become more opinionated in my stack. Generally, I use the following:
- Express
- Handlebars as my view engine (via express3-handlebars)
- YUI on the client (and on the server, if I need Models on the server interacting with a DB)
- MongoDB (with Mongoose), or MySQL (with Sequelize)
- SocketIO (optional)
Instead of starting from scratch, I decided to fork the popular node-boilerplate repo, and make some modifications so that it represents the stack above. This is the result. It’s my starting point whenever I’m creating a new Express app on NodeJS. I just do the following:
> git clone git@github.com:tilomitra/node-boilerplate.git myprojectname
> cd myprojectname
> npm install
> npm start
Thanks for sharing!!