Skip to main content

Prerequisites

  • Node.js >= 18
  • npm >= 9

Setup

1

Clone the repository

git clone https://github.com/sebasgao05/duitama-taxi-pricing.git
cd duitama-taxi-pricing
2

Install dependencies

npm install
3

Configure environment variables

Copy the example file and adjust values as needed:
cp .env.example .env
4

Start the development server

npm run dev
This uses ts-node-dev with --respawn and --transpile-only, so the server restarts automatically on every file change.

Available scripts

CommandDescription
npm run devStart local server with hot-reload (ts-node-dev)
npm run buildCompile TypeScript to dist/
npm run build:lambdaCompile TypeScript and copy src/swagger.yaml to dist/ (required for Lambda deploys)
npm startRun the compiled server from dist/server.js
npm testRun the test suite with Jest
npm run test:coverageRun tests and generate a coverage report

Running the compiled build

If you want to test the production build locally:
npm run build
npm start

Running tests

# Run all tests
npm test

# Run tests with coverage report
npm run test:coverage

Endpoints

Once the server is running, the following URLs are available:
URLDescription
http://localhost:3000/api/v2026API base path
http://localhost:3000/healthHealth check — returns { "status": "ok" }
http://localhost:3000/docsInteractive Swagger UI
The Swagger UI at http://localhost:3000/docs lets you explore and try every endpoint directly in the browser. It supports both light and dark mode and automatically points to your local server.

Build docs developers (and LLMs) love