Skip to content

alexanderley/train-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vendo Train API

This API works together with the train frontend. You can find the link to the frontend below. The API allows you to fetch train stations based on user input and also provides real-time information for all arriving and departing trains at the selected stations.

Technologies used

How to get started

Also make sure that you have installed the backend which serves the frontend with our train data.

You can find the repo for the backend here: https://github.com/alexanderley/train-frontend
Make sure the frontend runs on http://localhost:5173/ otherwise you can't send requests to the API.

Routes

HTTP verb URL Request body Action
GET /api/getStations/:query JSON Returns station suggestions based on the query the user enters.
GET /api/arrivals/:stationId JSON Returns all arrival trains from the next 0 to 60 minutes based on the station id
GET /api/departures/:stationId JSON Returns all departure trains from the next 0 to 60 minutes based on the station id

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published