Skip to content

The example of simple user auth API. Stack: Express, Sequelize, Typescript, Mocha

Notifications You must be signed in to change notification settings

4-life/backend-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The example of simple user auth API build status

The codebase consists of a basic NodeJS project with simple Sequelize models, Express.js routes, and integration tests.

A db connection to a local SQLite storage is already setup and all required tables (Users and Contacts), mapping the sequelize models, are in place.

The list of API routes

Tests

The Auth tests check endpoints for user sign-up and login, including verifying that protected routes are not accessible without authentication. The CRUD tests are independent from the Auth tests. They verify CRUD operations on the Contacts table.

Test results

Pre-requisites

  • Node
  • Yarn

Setup

Install the dependencies.

yarn

Run

Run the NodeJs backend locally.

yarn dev

Test

Execute the tests

yarn test
yarn unit-test

About

The example of simple user auth API. Stack: Express, Sequelize, Typescript, Mocha

Resources

Stars

Watchers

Forks