This repository contains both the Open Waters website and API.
.
├── website/ # Astro static site (openwaters.io)
├── api/ # Express API as Vercel serverless function (api.openwaters.io)
├── vercel.json # Vercel deployment configuration
└── package.json # Monorepo root with workspaces
npm run devThis runs:
- Website at http://localhost:4321
- API at http://localhost:3001
npm run dev:website # Astro site only
npm run dev:api # API only- Install Vercel CLI:
npm i -g vercel - Login:
vercel login - Link project:
vercel link
vercel # Preview deployment
vercel --prod # Production deployment- Set
openwaters.ioas primary domain (website) - Add
api.openwaters.ioas additional domain (API routes)
The vercel.json configuration automatically routes /api/* requests to the Express API serverless function.
https://api.openwaters.io/tides/*- Tide predictions (powered by @neaps/api)https://api.openwaters.io/bathymetry/*- Crowd-sourced depth data (coming soon)https://api.openwaters.io/health- Health check
Copy website/.env.example to configure local development (not needed for production—Vercel uses its own env config).