A straightforward starter for Node javascript web projects. Using Koa, MobX and ReactJS (with universal / isomorphic server rendering)
UNLICENSE License
Along with aiming to use the bleeding-edge of JavaScript (within reason- and all thanks to Babel), this repository represents a choice of frameworks and libraries I think work well together for an enjoyable NodeJS and frontend coding experience.
A short rundown of the various technologies:
npm install
Or, even better (if you are using yarn
):
yarn install
To start the development server (which is what you want most of the time)
npm run dev
To start the production server is the usual npm start
, but the code has to be built first, so:
npm run build
npm start
Or for quick production testing npm run build-start
Before deployment to a production server, your code should always be built first- so that the default npm start
can be used to spin up quickly.
I'm using the babel-register
module which is required before any other server code and automatically converts any further requires / imports to ES5 javascript. This is for development purposes only (npm run dev
) - as recommended.
The server code (and the React code which is used on the server) is then built into the /built
folder for production use ( npm start
)