The idea behind this repo is to show how to use typescript with nodejs and also i've added a little flavor to the api using, Yup to validate the request body, Bcrypt to hash the password, JWT to handle tokens, Mongoose to handle the mongodb, docker + docker-compose to handle docker containers, and also Jest and Super test to test the endpoints.
The idea behind this repo is to be a simple repository with express, but production ready with authentication middlewares, body validators, password hashing and also with a sample of Docker + Docker compose to use and run inside a container.
-
Docker
-
Nodejs
-
Mongo
-
Yarn
There's two ways to run the code
-
Using docker will simply deploy a docker container with the mongodb and the node up and running at port 3000:
- Clone the repo and run the command
docker-compose up
- Clone the repo and run the command
-
Using yarn/npm we will simply install the deps and run the project:
- Clone the repo
- Install dependencies using
npm install
oryarn
- After run the following command
npm start
oryarn start
Just take a fork of this repo and send us a pull request following the templates for PR's, and assign me as a reviewer on the Pull Request