Code for Interview Problems
Interviewees can modify the createGroupSchedule method in ./scheduleEndpoint.js. This method is currently in a working state, but we could remove it (or parts of it) and have the interviewee fill in the missing parts. The method reads data from the database, formats it for a scheduling algorithm, and then stores the resulting schedule in the database.
This code is almost a direct copy of parts of the backend on a branch of the KVille repo in the DukeAML Github page. The entry point here is main.js, which first messes up the db, and then calls on createGroupSchedule to make a new schedule.
- Install Node and npm. It is recommended to install with version manager such as nvm. (Mac users can use brew). Please follow instructions on how to do so in the links below.
- Make sure you the yarn package manager installed by running:
npm i -g yarn
- yarn is a great alternative to npm as a dependency manager for Node.js. Read more here.
- Install all packages/dependencies
- Run
yarn install
Simply run node main.js in the terminal.