this is a simple template for create apis with nodejs using mongo and JwT auth
📦template
┣ 📂__tests__
┃ ┣ 📂integration
┃ ┃ ┗ 📜main.spec.js
┃ ┗ 📂unit
┣ 📂src
┃ ┣ 📂configs
┃ ┃ ┣ 📜database.config.js
┃ ┃ ┗ 📜server.config.js
┃ ┣ 📂controllers
┃ ┃ ┣ 📜delete.controller.js
┃ ┃ ┣ 📜get.controller.js
┃ ┃ ┣ 📜post.controller.js
┃ ┃ ┗ 📜put.controller.js
┃ ┣ 📂middlewares
┃ ┃ ┗ 📜verifyJwtToken.js
┃ ┣ 📂models
┃ ┃ ┗ 📜exemple.js
┃ ┣ 📂routes
┃ ┃ ┗ 📜routes.js
┃ ┣ 📂utils
┃ ┃ ┗ 📜verifyIsAdmin.js
┃ ┗ 📜main.js
┣ 📜.editorconfig
┣ 📜.eslintrc.json
┣ 📜.gitignore
┣ 📜ex.env
┣ 📜package.json
┗ 📜yarn.lock
The project is still under development and future updates will focus on the following tasks:
- Add Restfull Crud template
- [] Add a login system template
- [] Add a auth JWT template
Before starting, make sure you have met the following requirements:
-
You have installed the latest version of
Node.JS
.for install node.js go to
Node.js Siteand follow the instructions for your SO.
-
You have installed the classic stable: version of
Yarn
.for install Yarn go to
Yarn Classic Siteand follow the instructions for your SO.
-
You have installed
GIT
.for install GIT go to
GIT Siteand follow the instructions for your SO.
-
You have read
this readme.md
.
To clone, follow these steps:
Linux, macOS and windows:
git clone https://github.com/opauwlo/node-js-boilerplate-api.git <your project name>
cd <your project name>
yarn i
Linux, macOS and windows:
npm i -g sipas
To use s'ipas, follow these steps after install:
$ sipas
cd <your project name>
yarn i
We are using jest to perform the tests, to test the tests (funny) just run yarn test
inside your project
Para contribuir com s'ipa, siga estas etapas:
- Fork this repository.
- Create a branch:
git checkout -b <name_branch>
. - Make your changes and confirm then:
git commit -m '<message_commit>'
- send to original branch:
git push origin sipa / <local>
- Create the pull request.
Alternatively, consult the GitHub documentation how to create a pull request.
We thank the following people who contributed to this project:
opauwlo |