docs: update week 1 documentation

This commit is contained in:
ikechukwu Elizabeth
2026-04-04 05:39:20 +01:00
parent e6926d121e
commit 4508e58b30
+33 -45
View File
@@ -1,55 +1,43 @@
# Week 1 — Project Foundation and Backend Setup # Week 1 — Project Foundation and Backend Setup
1. Install Node.js and restart your computer ## What I Built
A production-structured REST API backend for the Scalable Task Platform using Node.js and Express.
2. Verify installation ## Technical Decisions
- Used dotenv for environment variable management instead of hardcoding values
- Structured error handling with a 404 handler and global error handler
- In-memory task store as a foundation before database integration in later weeks
`node -v` ## API Endpoints
`npm.cmd -v`
3. Create `app/backend`, `app/frontend`, and `docs` | Method | Route | Description |
|--------|-------|-------------|
| GET | / | API health check |
| GET | /health | Returns status and uptime |
| GET | /tasks | Returns all tasks |
| POST | /tasks | Creates a new task |
| PATCH | /tasks/:id | Toggles task complete or incomplete |
| DELETE | /tasks/:id | Deletes a task |
4. Create `server.js` and `package.json` inside the backend folder ## Project Structure
```
5. Create and update project documentation: scalable-task-platform/
- `README.md` ├── app/
- `docs/week-1-update.md` │ └── backend/
│ ├── server.js
6. Install dependencies │ ├── package.json
│ ├── .env.example
`cd app\backend` │ └── .gitignore
`npm.cmd install` └── docs/
└── week-1-update.md
This creates: ```
- `node_modules/`
- `package-lock.json`
7. Start the server
`node server.js`
You should see:
`Server running on port 3000`
8. Test the API — open in your browser
`http://localhost:3000`
`http://localhost:3000/health`
You should see:
- `/` → `Task backend is running`
- `/health` → `{"status":"healthy"}`
## Outcome ## Outcome
- Node.js and Express backend running on port 3000
✅ Node.js installed successfully - Full CRUD API validated with Postman
✅ Project structure created - Environment variables managed with dotenv
✅ Backend files created - Branch based Git workflow established
✅ Dependencies installed - Code pushed and merged via pull request on GitHub
✅ Backend working locally
✅ Health endpoint returning healthy response
## Next Step ## Next Step
Week 2: Containerize the backend with Docker
Week 2: Dockerize the backend service