Skip to content

A multi-player real-time quiz app created with Node.js and React Native

Notifications You must be signed in to change notification settings

anchetaWern/RNQuiz

Repository files navigation

RNQuiz

A multi-player real-time quiz app created with Node.js and React Native.

You can read the tutorial at https://pusher.com/tutorials/live-multiplayer-quiz-react-native.

Prerequisites

Getting Started

  1. Clone the repo:
git clone https://github.com/anchetaWern/RNQuiz.git
cd RNQuiz
  1. Install the app dependencies:
yarn
  1. Eject the project (re-creates the ios and android folders):
react-native eject
  1. Link the packages:
react-native link react-native-gesture-handler
  1. Update .env file with your Pusher app credentials.

  2. Set up the server:

cd server
yarn
  1. Update the server/.env file with your Pusher app credentials.

  2. Run the server:

yarn start
  1. If you're starting out with an empty db.sqlite file, access http://localhost:5000/create-db then http://localhost:5000/create-quiz on your browser. Otherwise, skip this step.

  2. Run ngrok:

./ngrok http 5000
  1. Update the src/screens/Login.js and src/screens/Quiz.js file with your ngrok https URL.

  2. Run the app:

react-native run-android
react-native run-ios
  1. Log in to the app on two separate devices (or emulator).

  2. Access http://localhost:5000/questions on your browser to start publishing questions.

Built With

Donation

If this project helped you reduce time to develop, please consider buying me a cup of coffee :)

Buy Me A Coffee

About

A multi-player real-time quiz app created with Node.js and React Native

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published