This repo is a minimal Node.js project starter.
- Node.js with NPM support.
Tools used during development phase:
There is no any external dependency on generated output.
Clone this repo and install all the tools:
$ git clone https://github.com/cwchentw/nodejs-boilerplate.git myapp
$ cd myapp
$ npm install
After editing myapp, update the remote URL to save it to a new repo:
$ git remote set-url origin https://example.com/user/myapp.git
$ git push -u origin master
Invoke this command to build the app in development mode:
$ npm run start-dev
All the JavaScript source files will be concatenated into single app.js, running it with node
.
Invoke this command to build the app in release mode:
$ npm start
In addition to code concatenation, the generated code will be minified as well to save disk space.
Run flow
to check type in source code:
$ npm run flow
You have to add flow-compatible type annotation in JavaScript code to use flow by yourself.
You have to edit srclist.js to set the order for file concatenation.
Copyright (c) 2019 Michelle Chen. Licensed under MIT license