CS3219-AY2425S1 / cs3219-ay2425s1-project-g20

nus-cs3219-ay2425s1-cs3219-ay2425s1-project-project-template created by GitHub Classroom
MIT License
2 stars 1 forks source link

Add questions route to repopulate with sample data #33

Closed Cloud7050 closed 1 week ago

Cloud7050 commented 1 week ago

Add a route to the questions service for development purposes. When GET (such as from the browser), the server deletes all existing questions in Firebase and repopulates it with a clean set of sample questions from the data/questions.json file.

Potentially useful for rapid testing and demo purposes, without fear of messing up our DB contents.

Cloud7050 commented 1 week ago

There exists services\question\src\scripts\upload.ts which runs as a script (npm run upload), adding each question asynchronously without clearing existing questions.

Cloud7050 commented 1 week ago

We have been managing thus far by keeping the db very clean during testing. Could bring up in the future if need be.