Skip to content

ThomasWYang/candidate_react_native_app

Repository files navigation

Readme

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.

Install via Git (recommended)

  1. 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
  1. Use git clone to copy repo to local
git clone https://github.com/ThomasWYang/candidate_react_native_app.git
  1. 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 图片

Install via Docker (not recommended because the docker image is big)

  1. Make sure Docker desktop (https://www.docker.com/) is running.
  2. Pull the docker image from docker hub.
docker pull thomasy2022/candidate_react_native_app
  1. 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
  1. 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 .

Usage

  1. Search all candidates (without any specification): click "Search" button directly

图片

  1. 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

图片

  1. Order search result by score : click "OrderByScore" button

图片

  1. 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:

图片

  1. 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.

图片

  1. Delete candidate: click "Delete" button on any displayed row, that candidate will be deleted and removed from current list.

图片

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published