Hey everyone! This repository is a 3 in 1 boilerplate that gives you some basic examples of creating a RESTful API in NodeJS, Express, Typescript and an optional database interaction with either MySQL or Mongo. This repository contains 3 folders. Here is a breif description of each, along with a link to a youtube video that will help you code it out yourself:
- typescript-express-nodejs-quickstart
- Stats:
- A basic boilerplate wwith a sample route and controller.
- https://youtu.be/vyz47fUXcxU
- typescript-mongoose-quickstart
- Stats:
- The same boilerplate with a sample MongoDB connection.
- https://youtu.be/lNqaQ0wEeAo
- typescript-mysql-quickstart
- Stats:
- Similar to the Mongo project, but with a custom mysql promise adapter.
- https://youtu.be/eTRSl1As83A
- ValidationByJoiExample
- Stats:
- Protect your API and validate your data using JOI.
- https://youtu.be/J5u9kXnPn8U
- ValidationByYupExample
- Stats:
- Protect your API and validate your data using YUP.
- https://youtu.be/J5u9kXnPn8U
Periodic updates may happen to this repo to make small bug fixes or improvements. Feel free to fork this repository and code away.
- 01/23/2021 - Adding MIT Licesnse
- 01/16/2020 - Fixing logging & logging the end of the request properly
Install the dependencies and start the server. When you clonse the respository, cd into it and cd into one of the directories to start. Whichever one you pick is where you will run the following commands below. <project_directory> is the directory you've chosen.
$ cd <project_directory>
$ npm install
MIT