0xcrypto102 / NodeBackendTemplate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node Backend Test for Podopolo

Run the project

Prerequisites:

Steps:

  • Install NodeJS dependencies: npm i
  • Create files named .common.env and .local.env
  • The .common.env file should contain this line:
NODE_ENV=local
  • Copy the content of the file .example.env into the file .local.env and set the right values of the variables
  • Please make sure you have environment for PostgreSQL
  • Create podopolo Database in PgAdmin
  • Run the command:
npm run start

Unit test the project

npm run test

Generators

  • Generate JWT certificates:
npm run generate:certs

This will generate two file: es512-private.pem and es512-public.pem. Make sure you have already installed openssl

  • Generate a new schema:
npm run generate:schema

VSCode snippets

  • To initiate a routes file use the snippet routes
  • To add a new route to an existing routes file use the snippet routes:add
  • To add a new method to an existing route use the snippet routes:method

About


Languages

Language:JavaScript 87.2%Language:Nunjucks 11.7%Language:Perl 0.4%Language:Raku 0.3%Language:Shell 0.3%