Prerequisites
Make sure you have the following installed:- Node.js (v14+)
- npm (bundled with Node.js)
Clone the Repository
Fetch the project source and switch into its directory:Project Structure
package.json
Yourpackage.json defines scripts, dependencies, and code coverage settings:
Available npm Scripts
Application Code (app.js)
Test Suite (app-test.js)
Frontend Controller (client.js)
Dockerfile
Kubernetes Service Manifest
Install Dependencies
Install all Node.js dependencies:Run Tests
Your tests require MongoDB credentials set via environment variables:Be sure to export
MONGO_URI, MONGO_USERNAME, and MONGO_PASSWORD before running tests.Hard-code Credentials (for Demo)
If you want to bypass environment variables during a demo, update app.js:Run Coverage
Generate coverage reports with:Start the Application
Launch your server locally: