Managing the Question DB
⚠️ Important update to instructions posted August 30, 2021.
Using Google Sheet as Database (Recommended)
Login to Google Drive.
Go to this spreadsheet.
Create your own copy of the spreadsheet by selecting
File > Make a copy...
.Now publish your copy of the spreadsheet by selecting
File > Publish to the web...
Choose the Comma-separated value option as shown below.
Click the
Publish
button and copy the full link provided.⚠️ If you are using your school Google account, ensure that you turn off restricting access to your school. If you are using a personal Google account your published link should work fine without needing to do this.
Find the setup() function in your JavaScript file, like the example below, and replace your link as the
googleSheetLink
.Now you can edit your Google Sheet and your question database will automatically be updated in your trivia app.
//Runs once at the beginning
function setup() {
var googleSheetLink = "https://docs.google.com/spreadsheets/d/e/2PACX-1vRYCi4KENeZMlf9JbV8BhVrdOHse2250INSiRo7gEYWUYp3V0jiWFKWcnm1jzx5q1BMsmd9fOopk2Z_/pub?output=csv";
trivia.loadGoogleSheet(googleSheetLink).then(displayWelcome);
}