Typescript Template for Node REST API
A simple TS template with configured with:
-
Knex Query Builder
-
JEST testing enviroment
-
.ENV enviroment variables
Setup:
Use this template by clicking at the "Use this template" button and following the instructions
after cloning your repository with the template, make sure you installed the packages with:
NPM: npm install
Yarn: yarn install
Server
Setup
Fill the .env info
Run the knex migrations:
NPM: npm knex migrate:latest
Yarn: yarn knex migrate:latest
Run
To run the server just run:
NPM: npm start
Yarn: yarn start
The template uses knex and express for the server
Two routes are already implemented, post and get for '/users
'
Tests
This template comes with Jest configured with two tests. to run them:
NPM: npm test
Yarn: yarn test