Skip to content

node.js QuizGame application powered by SocketIO and Express.

Notifications You must be signed in to change notification settings

nielsbakkers/QuizGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuizGame Release Contributors

This is a node.js QuizGame application powered by SocketIO (4.1.2) and Express (4.17.1).

Casus

I started this project to get familiar with socket.io. Before this project I never used sockets and wanted to enlarge my scripting skills and get experience with socket.io. I chose to make a QuizGame to start easy and make something I enjoy to make and could learn from.

Libraries

This project uses several npm libraries:

Installation

In order to host the QuizGame and use it you need to execute several commands.

1. Install required npm-packages

To make the github download as small as possible you need to download the npm packages needed by the node.js application locally. The required packages are listed in the package.json file.

Run the command npm install package.json to install the required packages.

2. Docker container setup

After you installed the packages locally you can setup a docker container with the docker-compose file that is listed above.

You can run the docker container by executing the following command in the directory where the docker-compose.yml file is located: docker-compose up

NOTE: Remember to change the volume locations. And if needed change the ports but don't forget to also change the port in the index.js file.

3. Access the QuizGame

When the docker container is active, you can access the QuizGame by visiting http://${ip}:1011/. When the page is loaded you can start playing the QuizGame alone or with your friends.

QuizGame

There are several subjects you can choose from like geography, history, language, film and culture. You can also add your own questions to the quizdata.js file.

NOTE: Don't forget to restart the docker container after changing the quizdata. Otherwise the new questions won't be loaded into the game.

Acknowledgements

I started this project after getting inspired by two youtube videos. The first video I watched was about a snake game that used Socket IO. After watching that video I wanted to work on a project that involved sockets. The second video I got inspired with a idea on how i could use sockets within a project.

Multiplayer Snake Game | JavaScript & SocketIO // by Traversy Media

10 JavaScript Projects in 10 Hours - Coding Challenge 🔥 // by Florin Pop

Contact

Created by @nbakkers - Feel free to contact me!

About

node.js QuizGame application powered by SocketIO and Express.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published