Please note: These instructions apply to running both loyalty-web and loyalty-app together. Loyalty-app can be found at: https://github.com/Kauri-2018/loyalty-app
*You will need Expo on your device: https://expo.io/
- Open loyalty-web in VS Code / code edtior of your choice
- Check what branch you are on and stage all of your changes if applicable
- Checkout development:
git checkout development
- Pull down any chages:
git pull origin development
- Intall dependencies as needed:
-
yarn
- Set up the database:
yarn knex migrate:rollback
yarn knex migrate:latest
yarn knex seed:run
- Check the .env file:
- there should be a JWT_SECRET and a PASSCODE in the file
- if not, you can add them or make a file with them inside
- Check that the database has seeds in each of the tables:
- users
- profiles
- visits
- Start the server with:
yarn dev
- Visit your localhost and ensure that you can login: if so, the server side is ready!
- Repeat steps 1 - 5 used in loyalty-web
- Check apiClient and change the API calls to your own IP address in each of the four functions:
- loginUser
- getUser
- checkinUser
- getUserHistory
*Make sure you've saved those changes!
npm run start
- If using iOS: send an email using the
s
hotkey orShare
, then follow the link from your device - If using Android: scan the QR code in the terminal from within the Projects tab in Expo
- You can now make a branch and start coding:
git checkout -b <YourBranchNameHere>
- Home(/)
- Adminlogin(/adminlogin)
- Adminregister(/adminregister)
- UserRegister(/userRegister)
- Admin profile(/profile)
- Statistics(/profile/statistics)
- Add new user(/profile/new)