Skip to content

ashutosh-b-b/NightsWatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NightsWatch

This project is a full-stack web application using MongoDB, a Node.js/Express backend, and a React frontend, all containerized with Docker and orchestrated using Docker Compose.


Demo

🧰 Technologies Used

  • 🐳 Docker & Docker Compose
  • 🌐 MongoDB 7.0
  • 🧭 Mongo Express (web-based MongoDB GUI)
  • 🔧 Express.js (Node.js backend)
  • ⚛️ React (Frontend - Jon)

🚀 Getting Started

🔧 Prerequisites

Ensure you have the following installed:


▶️ Run the App

From the root of the project:

docker-compose up --build

To run in the background:

docker-compose up --build -d

🛑 Stop the App

To stop and remove containers:

docker-compose down

🌐 Available Services

Service URL Description
Frontend http://localhost:3001 React frontend app
Backend API http://localhost:5059 Node.js/Express API
Mongo Express http://localhost:8087 MongoDB admin GUI
MongoDB localhost:27018 MongoDB database container

📦 Docker Commands

# Build and start containers
docker-compose up --build

# Stop and remove containers
docker-compose down

# View logs for a specific service
docker-compose logs backend

# Access a running container's shell
docker exec -it backend_container sh

📝 Environment Variables

Environment variables are currently defined in docker-compose.yml. You can refactor this by using .env files:

In docker-compose.yml:

env_file:
  - ./backend/.env

Then create .env inside backend/:

MONGO_URI=mongodb://mongodb:27017/mydb

Be sure to add .env to .gitignore to avoid committing secrets.


✅ .gitignore Recommendation

Create a .gitignore file in both frontend/jon/ and backend/ directories:

node_modules/
.env
dist/
build/
npm-debug.log

🧪 Testing the App

To test the backend:

curl http://localhost:5059

To test the frontend, visit:

http://localhost:3001

🛣 Roadmap

  • Build GitHub Action Plugin
  • Build Python and Julia Clients

🙌 Credits

Built with ❤️ using Docker, Node.js, and React.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published