forked from gitea_admin/simple-node
backend
This commit is contained in:
31
backend/README.md
Normal file
31
backend/README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Todo App Backend
|
||||
|
||||
This is a standalone Node.js Express API for a Todo application.
|
||||
|
||||
## Features
|
||||
- GET `/api/todos`: Fetch all todos
|
||||
- POST `/api/todos`: Add a new todo
|
||||
- GET `/`: Health check
|
||||
|
||||
## Standalone Setup
|
||||
1. Clone this repository.
|
||||
2. Install dependencies:
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
3. Start the server:
|
||||
```bash
|
||||
npm start
|
||||
```
|
||||
The server runs on port `3001` by default.
|
||||
|
||||
## Deployment
|
||||
- **Port**: Set the `PORT` environment variable to change the listening port.
|
||||
- **Docker**:
|
||||
```bash
|
||||
docker build -t todo-backend .
|
||||
docker run -p 3001:3001 todo-backend
|
||||
```
|
||||
|
||||
## Repository Independence
|
||||
This repository has no dependencies on the frontend. It can be deployed anywhere (AWS, Heroku, DigitalOcean, etc.) independently.
|
||||
Reference in New Issue
Block a user