This repository houses a toy project of a functional web application. It includes a deployed backend API built with NodeJS and a local front end built with ReactJS.
The backend API tests are written with Mocha, Chai & ChaiHTTP, and deployed with Heroku. It can be accessed via link.
Travis is integrated into this repo for Continuous Integration (CI) and Continuous Deployment (CD).
Screenshots and details can be found in this pdf
cd
into working directory
Run npm install
Use npm run
to spin up the front end locally
Access the application via localhost:3000
This is an optional step as the API is already deployed on Heroku
cd
into working directory
Run npm install
Use node index.js
to spin up the API locally
Test the API works with Postman etc.
Built with Node.JS and tested with Postman.
Automated API testing with Mocha, Chai, ChaiHTTP
Functionalities
Type | Endpoint | Description |
---|---|---|
GET | /getAllUsers | Returns all users in database |
GET | /getUser/:id | Returns a user by specified id |
POST | /users/ | Adds a user into the database |
PUT | /users/:id | Updates a specified user id |
DELETE | /users/:id | Deletes a specified user id |
Type | Endpoint | Description |
---|---|---|
POST | /users | Returns error code 400 if name or email is missing |
Setup with Travis CLI.
Test scripts and Heroku deployment scripts were automated by Travis. See pdf for more information.
Built with ReactJS and the Bootstrap UI library.
Initialized by Create React App