agep-cargo/backend
2025-10-11 03:21:04 +02:00
..
db.js feat: add basis of project 2025-10-11 03:21:04 +02:00
package-lock.json feat: add basis of project 2025-10-11 03:21:04 +02:00
package.json feat: add basis of project 2025-10-11 03:21:04 +02:00
README.md feat: add basis of project 2025-10-11 03:21:04 +02:00
server.js feat: add basis of project 2025-10-11 03:21:04 +02:00

agep-cargo Backend

This is a minimal Express backend for the AGEPOLY cargobike booking platform.

Setup

  1. Copy the example env file and update it:

    cp .env.example .env

    then edit .env to set DATABASE_URL

  2. Install dependencies

    npm install

  3. Run migration (using psql or your database tool) to create the bookings table:

    psql "$DATABASE_URL" -f migrations/create_bookings.sql

  4. Start the server

    npm run dev

API

  • GET /api/health - health check
  • GET /api/bikes - list available bike types
  • POST /api/bookings - create a booking (bike_type, start_date, end_date, name, email)
  • GET /api/bookings - list recent bookings