
Prerequisites
- Node.js and npm
- A running MongoDB instance or Atlas cluster
- Git installed on your machine
Clone the Repository
Project Structure and Key Files
This repository includes:- package.json: Defines metadata, scripts, dependencies, and coverage thresholds
- app.js: Backend Express.js server
- client.js: Frontend script to fetch planet data
- Dockerfile: Build instructions for a Docker image
- deployment.yaml & service.yaml: Kubernetes manifests
package.json
Application Backend (app.js)
Ensure you add your REST API route handlers in
app.js (for example, a GET /os endpoint) before testing.Frontend Controller (client.js)
Dockerfile
Kubernetes Manifests
Install Dependencies
Running the Server Locally
After dependencies are installed:

Testing the Application
Run the test suite:Tests will fail without
MONGO_URI, MONGO_USERNAME, and MONGO_PASSWORD. Set these before running npm test.Temporary Local Credentials
For a quick local demo, hard-code your MongoDB URI inapp.js:
test_results.xml file is generated for CI/CD:
Coverage Report
Generate coverage:Links and References
- Node.js
- npm
- Express Documentation
- Mongoose Documentation
- Mocha
- nyc (Istanbul)
- Docker Hub
- Kubernetes Basics