| .. | ||
| db.js | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| server.js | ||
agep-cargo Backend
This is a minimal Express backend for the AGEPOLY cargobike booking platform.
Setup
-
Copy the example env file and update it:
cp .env.example .env
then edit .env to set DATABASE_URL
-
Install dependencies
npm install
-
Run migration (using psql or your database tool) to create the bookings table:
psql "$DATABASE_URL" -f migrations/create_bookings.sql
-
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