This is the API provider for the VIAplanner frontend. It handles database population and content serving to clients.
git clone https://github.com/VIAplanner/via-api
cd via-api
npm install
npm run dev-
Ensure that you have placed the following files (generated from the scraper ):
courses.json- Data for all offered courses in all currently offered sessionsdivisional.json- Divisional data such as HTML legends, and enrolment indicator datareference.json- Reference data such as more information on the currently offered sessions and their subsessions and all the divisions that are offering coursesmisc.json- Other miscellaneous data
-
Run the following command to automatically clear the old database data and populate it with the new data
npm run populateMONGODB_URL: A link to the mongodb database, for example "mongodb://localhost:27017/via-api-dev"
NODE_ENV: Either 'development' or 'production', used to loosen/enforce CORs restrictions