OAuth 2.0 boilerplate for microservices
Install the prerequisites and the required node modules.
- Node.js: v20.x.x
- MySQL: MySQL 8+ or MariaDB 10+ or SQLite 3.44.x+
Clone the repository to start.
git clone https://github.com/sprintr/marmalade.git
Once the cloning is complete, you can install the dependencies.
cd marmalade
npm install
Create a file named .env
using the provided .env.example
.
cp .env.example .env
Set the properties for your development environment in the .env
.
Then, we need to generate public/private keys to generate JWT access tokens.
mkdir certs && cd certs
openssl genrsa -out PRIVATE.pem 2048
openssl rsa -in PRIVATE.pem -pubout -out PUBLIC.pem
cd ..
Now, you're ready to build and launch the serve.
npm run build
npm start
Check out the docs to use the API.
Run the command below to lint the code. Make sure you lint and test your code before submitting a PR.
npm run lint
Run the command below to test the code. Make sure you test your code before before submitting a PR.
npm run test