| backend | ||
| frontend | ||
| Scripts | ||
| .dockerignore | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| README.md | ||
CC-Data | Traveloptimizer
Campus Cup AKMC Data Traveloptimizer
Backend
Requirements
- MariaDB or MySQL
- node
10.12or higher - Configure database in
.env-file or environment variables. See.envfor reference - Set API-Key for meteostat.net in
.env-file or environment variable - import
setup.sqlfor sample data
Start
- Run
$(cd backend && npm run start) - call http://localhost:3000/v1/update/climate to fetch climate data for sample entries.
Search
Customize your search with query parameters. For now, only climate parameters are supported. If you omit climate queries, all climate parameters will be randomized.
Following queries are supperted by now:
- from=YYYY-MM-DD (required)
- to=YYYY-MM-DD (required)
- temperature=NUMBER,NUMBER
- raindays=NUMBER,NUMBER
- sunhours=NUMBER,NUMBER
- percipitation=NUMBER,NUMBER
Examples: http://localhost:3000/v1/search?from=2020-06-14&to=2020-07-29&temperature=27,29&raindays=8,12&sunhours=250,300 http://localhost:3000/v1/search?from=2020-06-14&to=2020-07-29
More
To get more search results, add more entries with meteostat station IDs to the regions table in the database
Frontend
Installation
- Install node 10.15.3
- Run "(cd frontend && npm i)"
Start dev server
- Run "(cd frontend && npm run start)"