Skip to content

Kelexer1/ViaPlanner-API

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is the API provider for the VIAplanner frontend. It handles database population and content serving to clients.

Installation Using NPM

git clone https://github.com/VIAplanner/via-api
cd via-api
npm install
npm run dev

Populating The Database Using NPM

  1. Ensure that you have placed the following files (generated from the scraper ):

    1. courses.json - Data for all offered courses in all currently offered sessions
    2. divisional.json - Divisional data such as HTML legends, and enrolment indicator data
    3. reference.json - Reference data such as more information on the currently offered sessions and their subsessions and all the divisions that are offering courses
    4. misc.json - Other miscellaneous data
  2. Run the following command to automatically clear the old database data and populate it with the new data

npm run populate

.env Setup

MONGODB_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

About

This is the API provider for the VIAplanner frontend. It handles database population and content serving to clients.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 99.1%
  • Dockerfile 0.9%