sourabhgupta385 / nodejs-ci-cd

Sample NodeJs application with CI/CD pipeline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NodeJS CI/CD Demo

List of packages

  • express
  • jest
  • jest-junit
  • supertest

1. Start node server

$npm install
$npm start

Access to api http://localhost:3000

2. API Testing with Jest

$npm test

3. Deploy to target server with PM2

$pm2 start src/index.js
$pm2 restart all

4. API testing with Postman and Newman command

$cd postman
$newman run node-api.postman_collection.json

// Report
$newman run day01.postman_collection.json -r cli,junit

About

Sample NodeJs application with CI/CD pipeline


Languages

Language:JavaScript 85.1%Language:Dockerfile 14.9%