Skip to content

Latest commit

 

History

History
83 lines (62 loc) · 2.73 KB

README.md

File metadata and controls

83 lines (62 loc) · 2.73 KB

Fastify template

node version downloads license

tests codecov

fastify typescript node.js pnpm

A template for fastify with Typescript, eslint, pnpm and @kiwilan/fastify-utils.

Setup

pnpm i
cp .env.example .env
pnpm dev

Build

In .env:

LOG_LEVEL=error      # debug | error | fatal  | info | trace | warn | silent

PORT=3000 # pm2 port
BASE_URL=domain.com
HTTPS=true
pnpm build

Nginx

server {
  listen 80;
  listen [::]:80;
  server_name api.domain.com;

  charset utf-8;

  error_log /var/log/nginx/api.log warn;
  access_log /var/log/nginx/api.log;

  location / {
    include proxy_params;
    proxy_pass http://localhost:3000; # pm2 port
  }
}

License

MIT