Skip to content

Latest commit

Β 

History

History
87 lines (54 loc) Β· 1.23 KB

File metadata and controls

87 lines (54 loc) Β· 1.23 KB

IoT_CICD_2026

πŸ“¦ Node.js TypeScript Backend

A backend application written in Node.js with TypeScript, using ESLint for linting, Vitest for testing, and Docker for containerization.


πŸš€ Getting Started

Run the App Locally

  1. Compile the TypeScript files:
npm run build
  1. Start the app:
npm start

By default, the backend runs on port 5001.


πŸ§ͺ Run Tests with Vitest

Run all tests using Vitest:

npm run test

🧼 Run ESLint

Check your code for linting and style issues:

npm run lint

🐳 Docker

πŸ“¦ Build Docker Image

Make sure the app is compiled before building the image:

npm run build

Then build the Docker image:

docker build -t your-docker-username/your-app-name:latest .

πŸš€ Run Docker Container

Run the container and map port 5001:

docker run -d -p 5001:5001 your-docker-username/your-app-name:latest

Your app will be accessible at:
http://localhost:5001


βœ… Summary

  • Build: npm run build
  • Test: npm run test
  • Lint: npm run lint
  • Start: npm start
  • Docker build: docker build -t ...
  • Docker run: docker run -d -p 5001:5001 ...