The Gamejitsu Typescript React.js frontend.
1) Fire up your console & clone this repo:
❍ git clone https://github.com/gamejitsu/gamejitsu-web.git
2) Enter the directory and install all the dependencies:
❍ cd gamejitsu-web && npm install
3) Create .env file
❍ touch .env
4) Edit .env & add the following variables:
__❍ API_ENDPOINT=http://localhost:4000
__
__❍ SOCKET_ENDPOINT=ws://localhost:4000
__
5) Load the environment variables:
❍ cd .
6) Start the Next server!
❍ npm run dev
7) Visit the Gamejitsu home page on your browser:
8) Start the tests:
❍ npm run test
When a customer completes a checkout successfully, Stripe calls the backend to create a review request. If you are working with http://localhost:4000, of course Stripe cannot call it directly
You need to create a tunnel, start ngrok
to support Stripe webhooks, it will allow the creation of the review request after a successful checkout.
❍ ngrok http -hostname=gamejitsu-dev-us.ngrok.io 4000
Check on the Stripe Dashboard, enabling test data, that both the api key and the stripe webhook secret are correct.
1) Run Prettier:
❍ npm run prettier -- --write
2) Run Tests updating snapshot if needed (or CI will fail):
❍ npm run test -- --updateSnapshot