This is a Next.js project that provides real-time public transport information for Vienna using the Wiener Linien API.
The Wiener Linien API was reverse engineered to provide details about the air conditioning in metro lines.
Built with:
- Next.js 14
- TailwindCSS
- Hosted on Cloudflare Pages via next-on-pages
- npm
- wrangler
- Cloudflare Workers/Pages to deploy as Full Stack Application
- Clone the repo
- Install dependencies via
npm install
in the root directory - Run the development server
npm run dev
:
Open http://localhost:3000 with your browser to see the result.
This project integrates with Cloudflare Pages. Besides the dev script mentioned above, there are a few extra scripts for Cloudflare integration:
- pages:build: Build the application for Pages using the @cloudflare/next-on-pages CLI.
- preview: Locally preview your Pages application using the Wrangler CLI.
- deploy: Deploy your Pages application using the Wrangler CLI.
Note: While the dev script is optimal for local development, you should periodically preview your Pages application to ensure it works properly in the Pages environment.
For more details, see the @cloudflare/next-on-pages recommended workflow.
/api/monitor
Fetches real-time public transport information from the Wiener Linien API.
stopID
: The ID of the stop to fetch information for.
"http://localhost:3000/?stopID=12345"