This is a API REST Boilerplate for most common requeriments in all project (or it try it). The capabilities that AlexHg/Loopback4-Boilerplate contemplates in this repository are the following:
- User Authenticate with JWT Passport and password hashing service secured
- Role Authorization
- Email client service adaptabled to local register ENDPOINT
- Connection with MongoDB Atlas
- Environment variables (.env file)
- DataFixtures
Extras
- (Dependencia de nodemon) Code watcher
Cloning the repositorie
git clone https://github.com/AlexHg/Loopback4-Boilerplate.git <YOUR_PROJECT_NAME>
cd <YOUR_PROJECT_NAME>
rm -rf .git
git init
git remote add origin <YOUR_OWN_REPOSITORY_URL>
Dependencies instalation
npm i
npm install -g nodemon
Create .env based on .env.example file and add your data
cp .env.example .env
Run the project
npm run start:watch
Insert a new line in the .env file following the file style, when thats complete, you can add the env.var in your code like
process.env.ENVIRONMENT_VAR
Go to http://localhost:3000/explorer in your explorer to see the documentation.