Skip to content

Top down API with Express, Postgresql and unit testing via. Mocha-chai

Notifications You must be signed in to change notification settings

ericmoore123/API-Ground-Up

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API - Groud up (With Unit tests) - (In-Progress)

Solid API built with Express with fully functional CRUD operations via a Postgres database.

Concrete examples of using Mocha and Chai to unit test JavaScript APIs and applications.

Installation and Quick Start

A NodeJS installation of v16^ required. Post man strongly recommended

$ git clone https://github.com/ericmoore123/mocha-testing-js.git
$ npm i

Verify dependencies after install.

Running Express API

API code and utilities are held under root directory and /utils respectively.

$ npm run dev

Server port declared as value held within a .env file but explicitly defined as port:8800 (fallback) by default.

Running Tests

Tests are held within the /test directory as per mocha documentation.

Test commands

$ npm test

Releases

No releases published

Packages

No packages published