Node project from zero - weliame/MyDoc GitHub Wiki

Hopefully the guide will help start up a node.js project with whole modern front end techs from zero.

Start a node js project

mkdir project_name

// cd to the project name
cd !$ 

git init

// Pull down a preconfigured .gitignore file for node projects from github
wget https://raw.githubusercontent.com/github/gitignore/master/Node.gitignore -O .gitignore

// Init node project with npm, make sure set version is '0.0.0'
npm init

// Project version coule be controled by npm. 
// There are three options for this command being major, minor and patch each of which increments the version numbers in that order.
npm version minor  // Update the version from 0.0.0 to 0.1.0.

Set project folders

.
├── .gitignore
├── .npmrc
├── README.md
├── package.json
├── src
│   └── app
│       ├── assets
│       ├── components
│       ├── containers
│       ├── index.js
│       ├── utils
│       └── views
└── yarn.lock