- NodeJS v8+
- Global node modules
- firebase-tools
- recommended (optional)
- nvm (to install multiple node versions)
A step by step series of examples that tell you how to get a development env running
- clone repo
npm install
npm start
- transpile babel code to node js code:
npm run babel
cd functions
- install modules if needed:
npm install
- must be assigned to active project; if not assigned to project,
firebase use --add my-project-name-from-firebase-console
- run firebase server:
npm run serve
npm run deploy
- modules installed in project root should also be installed in firebase folder
console.log()
should only be used in development. Eslint will block you from committng changes if it finds console.log()console.info()
info you want to log to firebase logging(e.g., route, request body, response, etc.).console.warn()
client errors, 4xx errors(e.g. 400 Bad Request, 403 Forbidden, 404 Not Found, 405 Method Not Allowed, etc.).console.error()
5xx server errors(e.g., 500 Internal Server Error, etc.).