https://github.com/chrisru/trains-frontend
🚅 Frontend for a train project to show which part of the train is most crowded
https://github.com/chrisru/trains-frontend
frontend ns preact school-project trains
Last synced: 3 months ago
JSON representation
🚅 Frontend for a train project to show which part of the train is most crowded
- Host: GitHub
- URL: https://github.com/chrisru/trains-frontend
- Owner: ChrisRu
- Created: 2017-11-29T14:36:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-22T21:31:46.000Z (over 7 years ago)
- Last Synced: 2025-01-25T15:30:12.229Z (4 months ago)
- Topics: frontend, ns, preact, school-project, trains
- Language: JavaScript
- Homepage:
- Size: 339 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Train Crowdedness Visualizer
Visualize the crowd in a train, so people can enter and leave more quickly.## CLI Commands
``` bash
# install dependencies
npm install# serve with hot reload at localhost:8080
npm run dev# build for production with minification
npm run build# test the production build locally
npm run serve
```For detailed explanation on how things work, checkout the [CLI Readme](https://github.com/developit/preact-cli/blob/master/README.md).
## API
url: http://trainemulator.azurewebsites.net/
endpoints:GET /
Get all trainsGET /{id}
Get train by idPOST /random
{ "enabled": "true" | "false" }
Toggle the randomize interval on or offPOST /{id}/edit
{ "destination": "string", "startingPoint": "string" }
Edit train detailsPOST /{id}/{compartment}/edit
{ "peopleCount": "number" }
Edit compartment detail