Backend as a service(BaaS) platform.

Features

Quick start

  1. Clone this repo using git clone https://github.com/shuperry/fastify-starterkit-api.git.
  2. Run npm install or yarn to install dependencies.
  3. Run npm i pm2 pino pino-pretty -g to install global dependencies.
  4. Run npm start to start service in local development mode.
  5. Run pm2 logs --raw fastify-starterkit-api-local | pino-pretty -c -f -t SYS:standard to see logs in local development mode.

Configuration

We use nconf to manage configuration between different environment, the configuration of current environment file name is just the same as environment, and it is extend with src/config/default.js.

Environments

production mode

  1. Start core serice script: npm run prod_cluster.

Execute start service script except local env need install pm2 globally: npm install pm2 pino -g.

development mode

  • startup services:
  1. Start core serice script: npm run dev.
  • show log scripts:
pm2 logs --raw fastify-starterkit-api-dev | pino -L