diff options
Diffstat (limited to '')
| -rw-r--r-- | README.md | 61 |
1 files changed, 61 insertions, 0 deletions
@@ -0,0 +1,61 @@ + + +A minimal task management API with user authentication, built with express and better-sqlite3. + + + + + +~download + +You can get a copy using git with the following command: + +```bash +git clone https://git.200l.xyz/crud +``` + + + +~features + +- Create, read, update, and delete tasks. +- User authentication with sessions. +- Per-user task isolation. +- Lightweight sqlite database, no external db server needed. + + + +~dependencies + +- node.js +- express +- better-sqlite3 + + + +~development + +Install dependencies and start the server: + +```bash +npm install +node server.js +``` + + + +~usage + +Register a user, log in, and manage tasks via the rest api: + +| Method | Endpoint | Description | Body | +|----------|----------------|----------------------|-----------------------------------| +| `POST` | `/tasks` | Create a new task | `{ "title": "...", "description": "..." }` | +| `GET` | `/tasks` | Get all tasks | — | +| `GET` | `/tasks/:id` | Get a single task | — | +| `PUT` | `/tasks/:id` | Update a task | `{ "title": "...", "description": "...", "done": 0 }` | +| `DELETE` | `/tasks/:id` | Delete a task | — | + +~license + +Trinity |