-
Notifications
You must be signed in to change notification settings - Fork 7
A Guide to Displaying Question and Answer Cards in the Game
You will realize, upon cloning and running this game locally, that the question / answer cards are not available. This is a guide on how to add the question and answer cards to an mLab database and getting the game to fully run locally.
Refer to the official documentation on how to create an mLab database here. Be sure to set a database user and password.
Add two collections to the database; one for questions and the other for answers.
You can do this in either of two ways:
- Directly add the documents in the respective collections on the mLab database.
- Use a MongoDB management tool like Robomongo to both create and add documents to the respective collections.
Question and answer files used for this project are available here
In your .env file, set your database to point to the mLab database:
MONGOHQ_URL=mongodb://<dbuser>:<dbpassword>@ds139899.mlab.com:39899/wiki-example
Where <dbuser>
is the database user and <dbpassword>
is the database password.
Remember to also use the same database URL for your deployments.