An online Treasure Hunt build for the techno-cultural fest @aaroh19.
πββοΈ Made by @abhijithvijayan
You can see the awesome demo here.
- Express.JS
- Passport.js
- MongoDB
- Webpack Bundler
- SASS
- Pug Templating Engine
- yarn package manager
49 & later β | 47 & later β | 36 & later β |
Uses google-oauth 2.0 with passport.js
You must be an admin to make changes to the game. To make yourself an admin
- Sign In with your Google Account
- Use any mongodb client to edit the document saved under
User
collection - Update
permission
field to value20
for the account.
Done, You can now see options to edit the game in the dashboard.
Edit the /views/mixins/_question.pug
file to your need.
Set isEnded
flag under Game
Model in DB to 1
.
Use the Send Alert
option in Admin Panel.
- Save your
svg's
under/public/images/icons/
- Save your
images
under/public/images/photos
- Save your
audio files
under/public/images/audio
- Import your static assets to
/public/javascripts/glitch.js
- Copy contents from
variables.env.sample
tovariables.env
- Fill in with your credentials (Generate google API key from console)
yarn run dev
launches express atPORT 7777
- Visit
localhost:7777
in your browser to load the game
- Run
yarn run build
to minifyJS
andCSS
- Update
PORT=80
andNODE_ENV="production"
invariables.env
file - Then run
yarn start
to launch the server
Create a MongoDB admin in mongo shell
> mongo
> use admin
> db.createUser(
{
user: "abhijithvijayan",
pwd: "fBxY3oEA3DCeVN0Pe1PMORx3Td18WNdOy6B5s223C",
roles: [ { role: "userAdminAnyDatabase", db: "admin" }, "readWriteAnyDatabase" ]
}
)
Create a database and user for Glitch
> use glitch
> db.createUser(
{
user: "glitchAdmin",
pwd: "ADbTfu6vbaDR08775pQSk9uAwhHpo8wBsmAKdSiql7",
roles: [ { role: "readWrite", db: "glitch" } ]
}
)
If you have previously loaded data to your DB, you can wipe your database 100% clean with:
yarn run blowitallaway
Also delete all the other collections
manually with MongoDB Compass
This project is licenced under MIT