This is a simple react native app consuming Rest Api from https://github.com/ThomasWYang/tpg_demo deployed on AWS EC2 http://13.236.184.156 The app is only tested on web browser.
- Make sure Node.js 18+ (https://nodejs.org/en/) is installed in the local environment. Use following command in command line to check.
node -v
npm -v
- Use git clone to copy repo to local
git clone https://github.com/ThomasWYang/candidate_react_native_app.git
- Change directory into that folder and run following command, the app will run on default port 19006.
npm install
npm run web
If you see this info is displayed, the app is running correctly
- Make sure Docker desktop (https://www.docker.com/) is running.
- Pull the docker image from docker hub.
docker pull thomasy2022/candidate_react_native_app
- Run the following command to run the app in a container. The app will run on port 19006 with below command.
docker run -d -p 19006:19006 thomasy2022/candidate_react_native_app
- You can also use docker-compose.yml file inside this repo combined with the docker image to run the app
docker compose up
It will run on configured port 19006 and you will see similar info below.
If the webpage is not opened automatically, please open http://localhost:19006 .
- Search all candidates (without any specification): click "Search" button directly
- Search candidates by fname, lname or email (you can give any combination of these 3 fields): give value in relevant field and click "Search" button
- Order search result by score : click "OrderByScore" button
- Add candidate: ensure the rightmost button on second row is "Add" and click and give at least fname and lname to add candidate If missing fields:
If add successfully:
- Update candidate: click "Switch to Update" button to change "Add" to "Update",
Then click "Select" button on any displayed row to make the id become a valid value, give at least fname and lname to update candidate. The candidate will be updated after clicking "Update" button.
- Delete candidate: click "Delete" button on any displayed row, that candidate will be deleted and removed from current list.