Skip to content

lizgeorge1/nodejs-boilerplate-basic

Repository files navigation

nodejs-boilerplate-basic

Backend nodejs boilerplate

Install

git clone [repository-url]
cd [repository-url]
npm install

Linting

npm init @eslint/config@latest [Already installed with dev dependencies]
npm run lint
npm run lint:fix

Environment Variables

Create a .env file in the root directory and define the necessary environment variables:

PORT=3000
API_KEY=your_api_key

API development

Base URL

http://localhost:3000/api/

Health Check

Endpoint to verify the API is running and check service status.

GET /health

POST /module1/endpoint

Workflows

  • 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 pm2 in the server.
    • Update package.json with the pm2 start script.
    • Ensure to add AWS_EC2_HOST and SSH_PRIVATE_KEY in the GitHub secrets.

About

Basic Nodejs Boilerplate to get started.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors