Backend nodejs boilerplate
git clone [repository-url]
cd [repository-url]
npm installnpm init @eslint/config@latest [Already installed with dev dependencies]
npm run lint
npm run lint:fixCreate a .env file in the root directory and define the necessary environment variables:
PORT=3000
API_KEY=your_api_keyBase URL
Endpoint to verify the API is running and check service status.
GET /health
POST /module1/endpoint
- build.yml: Defines the CI/CD pipeline for building and testing the project.
- Update the file with the correct path of pm2 by calling
which pm2in the server. - Update
package.jsonwith thepm2 startscript. - Ensure to add
AWS_EC2_HOSTandSSH_PRIVATE_KEYin the GitHub secrets.
- Update the file with the correct path of pm2 by calling