I was asked to create a reservation system demo for a job interview. Two apps: the first is to provide an API for the reservation system — the second, a react-native app that uses the API.
Live Play Store app: https://play.google.com/store/apps/details?id=com.pliske_reservation
video example: https://youtu.be/jqJUWwZGlyA
- React
- React-Native
- Express
- GraphQL - Apollo
- Nodejs
- Clone / download repo.
- cd to repo directory.
cd frontendand runyarnornpm i.- cd back out to main repo, and then
cd backendand runyarnornpm i. - You've now installed the frontend and backend.
- You might want to open some terminal tabs for the rest of this.
- Open backend/app.js, and replace the process.env.DBPATH environmental variable with a URL to your own DB instance. Mine was an mLab Mongo DB URL.
- Tab #1, cd to backend, and run
npm start. Local GraphQL server now running.
- Open new tab, cd to frontend, and run
react-native run-android. - Debugging: Open new tab, cd to frontend, and run
react-native log-android. - Emulator hot loading: Select emulator, Command + m, choose hot reloading.
- Device hit reloading: Shake Android phone, choose hot reloading.
- Open new tab, cd to frontend, and run
react-native run-ios. - Debugging: Command + d should open up a good debugger.
- Hot reloading: Command + d, choose hot reloading.
https://play.google.com/store/apps/details?id=com.pliske_reservation
- use IP, not localhost in client
- Make sure to call
if (data.loading)... otherwise will think array is empty.
