A minimal JSON API starter built with routup on Node.js.
routupfor routing@routup/bodyfor JSON / urlencoded body parsingtsxfor zero-config TypeScript execution- Two example routes:
GET /healthandPOST /echo
npx degit routup/templates/node-api my-app
cd my-app
npm install
npm run devThe server listens on port 3000 (override with PORT=8080).
curl http://localhost:3000/health
# -> {"status":"ok"}
curl -X POST http://localhost:3000/echo \
-H 'content-type: application/json' \
-d '{"hello":"world"}'
# -> {"received":{"hello":"world"}}| Script | What it does |
|---|---|
npm run dev |
Start the server with auto-reload on file changes |
npm start |
Start the server once (no watcher) |