Skip to content

About

Small dependency-free REST API for managing tasks (Node.js)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

taskdesk-api

A small, dependency-free REST API for managing tasks, built on Node's built-in http module. It exists as a compact codebase for exercising pull-request workflows and automated code review.

Requirements

  • Node.js 20 or newer (no npm install needed — there are no dependencies)

Run

npm start            # listens on http://localhost:3000
PORT=8080 npm start  # custom port
npm test             # runs the test suite with node:test

API

Method Path Description
GET /health Liveness check
GET /tasks List tasks
POST /tasks Create a task
GET /tasks/:id Fetch one task
PATCH /tasks/:id Update any subset of fields
DELETE /tasks/:id Delete a task

Task fields

Field Type Default Notes
title string required 1–200 characters, trimmed
status todo | doing | done todo
priority integer 1–3 2 1 is highest
dueDate YYYY-MM-DD string or null null must be a real calendar date
tags array of up to 10 strings [] lower-cased and de-duplicated

Example

curl -X POST localhost:3000/tasks \
  -H 'Content-Type: application/json' \
  -d '{"title":"Write release notes","priority":1,"tags":["docs"]}'

Validation failures return 400 with a details object keyed by field name.

Layout

src/
  index.js      process entry point
  server.js     HTTP routing and error mapping
  store.js      in-memory task storage
  validate.js   request validation
test/           node:test suites

About

Small dependency-free REST API for managing tasks (Node.js)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages