Seans-TypeScript-NodeJS-CRUD-REST-API-Boilerplate

MIT License

Rememeber, No guarantees, or even fit for a particular purpose.

This project will be updated slowly as required, so stay tuned.

If you have a suggestion, or you want to contribute some code, you are free to make a pull request.

Your contributions will be visible since this project is public.

Setup

npm install

Development with nodemon and tsc --watch

npm run dev

Then visit http://localhost:3000/cats

Run without nodemon and tsc --watch

npm start

Then visit http://localhost:3000/cats

Swagger

Visit http://localhost:3000/swagger to view the OPENAPI document in Swagger-UI Swagger-UI

Video tutorial on setting up Swagger in an existing NodeJS TypeScript API

Add Swagger-UI Documentation To Existing NodeJS TypeScript API

Continuous Integration and Deployment

I've also added gitlab-ci.yml and dockerised with Docker-Compose. See video tutorial on how all this works. CI/CD a NodeJS API with Docker-Compose and GitLab

Heroku

You can also test this on heroku https://seans-typescript-nodejs-crud.herokuapp.com/cats

and view the Swagger-UI https://seans-typescript-nodejs-crud.herokuapp.com/swagger

Deploy

Usage

List all records

Example Get all records

Post (Create) Record

Example Post (Create) new record

Get by Id

Example Get by ID

Put (Update) Record

Example Put (Update)

Delete Record

Example Delete