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

A minimal and easy to follow example of what you need to create a CRUD style API in NodeJs using TypeScript

Primary LanguageTypeScriptMIT LicenseMIT

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

To help support this TypeScript boilerplate, please take a moment to look at my official Design Patterns in TypeScript book and TypeScript Courses.

Three.js and TypeScript

Socket.IO and TypeScript

Three.js and TypeScript : ASIN B094716FD6

Design Patterns in TypeScript : Paperback ASIN B0948BCH24, eBook : ASIN B094716FD6

MIT License

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

If you have a suggestion, or you want to contribute some code, you can 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

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

TypeScript Courses

If you got this far, you probably like TypeScript just like I do, I have created two TypeScript courses specializing in the Three.js and Socket.IO libraries that you may find useful.

Threejs and TypeScript Course

TypeScript Threejs Introduction

Socket.io and TypeScript Course

TypeScript SocketIO Introduction

Programming Books

To help support my projects, please check out my books.

Three.js and TypeScript

   https://www.amazon.com/dp/B09GYTKRCH
   https://www.amazon.co.uk/dp/B09GYTKRCH
   https://www.amazon.in/dp/B09GYTKRCH
   https://www.amazon.de/dp/B09GYTKRCH
   https://www.amazon.fr/dp/B09GYTKRCH
   https://www.amazon.es/dp/B09GYTKRCH
   https://www.amazon.it/dp/B09GYTKRCH
   https://www.amazon.nl/dp/B09GYTKRCH
   https://www.amazon.co.jp/dp/B09GYTKRCH
   https://www.amazon.ca/dp/B09GYTKRCH
   https://www.amazon.com.br/dp/B09GYTKRCH
   https://www.amazon.com.mx/dp/B09GYTKRCH
   https://www.amazon.com.au/dp/B09GYTKRCH

(ASIN : B09GZM9KGJ / B09GYTKRCH)

Design Patterns in TypeScript.

   https://www.amazon.com/dp/B0948BCH24
   https://www.amazon.co.uk/dp/B0948BCH24
   https://www.amazon.in/dp/B094716FD6
   https://www.amazon.de/dp/B0948BCH24
   https://www.amazon.fr/dp/B0948BCH24
   https://www.amazon.es/dp/B0948BCH24
   https://www.amazon.it/dp/B0948BCH24
   https://www.amazon.co.jp/dp/B0948BCH24
   https://www.amazon.ca/dp/B0948BCH24
   https://www.amazon.com.au/dp/B094716FD6

(ASIN : B0948BCH24 / B094716FD6)


Thanks

Sean