Reference guide

OctoSupply API (TypeScript)

Express + TypeScript reference implementation of the OctoSupply API. The C#, Python, and Java variants are ports of this service.

Run#

npm install
npm run dev

Default API URL: http://localhost:3000

Environment#

  • PORT (default: 3000)
  • DB_FILE (default: ./data/app.db)
  • API_CORS_ORIGINS (comma-separated override; optional)
  • DB_ENABLE_WAL (enable WAL mode; default: true)
  • DB_FOREIGN_KEYS (enforce foreign keys; default: true)
  • DB_TIMEOUT (busy timeout in ms; default: 30000)

Database#

On startup, the API applies SQL migrations from:

  • ../database/migrations/*.sql

and seeds from:

  • ../database/seed/*.sql

OpenAPI#

  • OpenAPI JSON: http://localhost:3000/api-docs.json
  • Swagger UI: http://localhost:3000/api-docs

Tests#

Run TypeScript tests from the src/ directory:

make test-ts
View this page's MarkdownLearning content is pinned to the credited upstream import.

Search the workshop

Solutions are not included.

    Search runs in your browser against the guide. It does not query GitHub or an AI service.

    Reset your workshop progress?

    This removes saved success criteria, completion marks, and the resume location in this browser. It does not change your repository or Azure resources.