/RNPokeBattle

A two-player Pokemon battle game implemented with React Native and Pusher

Primary LanguageJavaScript

RNPokeBattle

A two-player Pokemon battle game implemented with React Native and Pusher

Full tutorial is available here:

Prerequisites

Getting Started

  1. Clone the repo:
git clone https://github.com/anchetaWern/RNPokeBattle.git
  1. Install the app dependencies:
cd RNPokeBattle
yarn install
  1. Update Pusher config on src/screens/TeamSelectionScreen.js file:
componentDidMount() {
    this.pusher = new Pusher("YOUR PUSHER APP KEY", {
      authEndpoint: "YOUR_NGROK_URL/pusher/auth",
      cluster: "YOUR PUSHER APP CLUSTER",
      encrypted: true
    });
}
  1. Install the server dependencies:
cd server
npm install
  1. Update the .env file:
APP_ID=YOUR_PUSHER_APP_ID
APP_KEY=YOUR_PUSHER_APP_KEY
APP_SECRET=YOUR_PUSHER_APP_SECRET
APP_CLUSTER=YOUR_PUSHER_APP_CLUSTER
PORT=3000
  1. Run the server:
node server.js
  1. Download ngrok executable file.

  2. Expose server using ngrok:

./ngrok authtoken YOUR_NGROK_AUTH_TOKEN
./ngrok http 3000
  1. Copy the ngrok https URL and update the authEndpoint in the src/screens/TeamSelectionScreen.js file.

  2. Run the app and open it in your Expo client app:

expo start

Built With

Credits

Donation

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

Buy Me A Coffee