Jeopardye is a trivia game that you can play with your friends.
Jeopardye is a React app and a Node API server backed by a MongoDB database. The installation instructions below assume macOS, but similar steps should work for Linux.
Install dependencies.
$ brew install node
$ brew install yarn
$ brew tap mongodb/brew
$ brew install mongodb-community
If hosting the app yourself, you may also choose to install nginx (or the Web server of your choice).
$ brew install nginx
Start MongoDB.
$ brew services start mongodb-community
NOTE: If installing on an M1 Mac, you will need to run softwareupdate --install-rosetta
before starting MongoDB.
$ git clone https://github.com/will2dye4/jeopardye.git
$ cd jeopardye
$ yarn install
This section assumes you have followed the installation instructions above.
To start the server (on port 3333 by default):
$ yarn server
To start the webapp in development mode (on port 3000 by default):
$ yarn start
The file src/config.json.example
contains an example of the configuration for the app.
This file should be copied to src/config.json
and updated with the correct values for your environment.
In order to become an administrator in your instance of the app, you will need to first start the app and server
as described in the previous section. Open the app in a browser and create a player by clicking the Enter Room Code
button. Using the server logs, determine the player ID for the player you just created. Then, edit src/config.json
to add your player ID to the admin.playerIDs
section. Restart the app and server for your changes to take effect.
In the project directory, you can run:
Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode. See the section about running tests for more information.
Builds the app for production to the build
folder. It correctly bundles React in production mode
and optimizes the build for the best performance.
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
See the section about deployment for more information.
Runs the server at http://localhost:3333
. Expects MongoDB to be running.
There is a command-line interface (cli/jeopardye.py
) for managing a running instance of the Jeopardye app.
The CLI assumes that the app has already been configured to run in a server such as nginx.
The CLI supports the following commands:
deploy
- fetch latest changes and deploy the app and the serverdeploy app
- fetch latest changes and deploy the app onlydeploy server
- fetch latest changes and deploy the server onlyfetch
- fetch latest changeslogs
- show logs from the API serverserver pid
- print the PID of the API server processserver restart
- restart the API serverserver start
- start the API serverserver stop
- stop the API serverversion
- print the current version number