This is an example about using Push Notification API as a background service via Service Worker.
It has some dev ops implemented on the npm package:
- lint : babel-eslint
npm run lint
Is not working actually.
- dev : nodemon
npm run dev
Hotreloading running, with lint and ignoring public/js folder.
- start : babel-node
npm start
Runs the server with babel-node (kind of node but transpiling before) and with "dev" enviroment flags. babel-node works together with .babelrc file, the same as babel-cli.
Babel-node is not babel-node. Don't try to install it manually, it's just a dependency installed from babel-cli.
- build : babel
npm run build
For production build only.
- serve : node
npm run serve
For production serve only, running real Node.
If you haven't yarn on your computer, you could easily get it.
If you want to start coding just clone this repo, get into and run:
yarn install && npm run dev
Try to make a change on any file at /src folder. I suggest getting into /src/controllers/index.js to make a very fast and understandable change.