Todo App Frontend
This is a standalone Node.js server that serves the Todo application's web interface.
Standalone Setup
- Clone this repository.
- Install dependencies:
npm install - Start the server:
The frontend runs on port
npm start3000by default.
Connecting to Backend
The frontend needs to know where the Backend API is hosted.
- Development: Defaults to
http://localhost:3001. - Production: Set the
BACKEND_URLenvironment variable when starting the server.BACKEND_URL=https://api.yourdomain.com npm start
Deployment
- Docker:
docker build -t todo-frontend . docker run -p 3000:3000 -e BACKEND_URL=https://your-api.com todo-frontend
Repository Independence
This repository is completely separate from the backend repository. It communicates with the backend exclusively via HTTP calls to the BACKEND_URL.