Wiki page: https://github.com/cc-wong/react-demo/wiki
A simple demo on building a webapp with React JS.
This app includes the following module(s):
- Sumo Tournament Schedule Lookup
A lookup module for the Grand Sumo Tournament schedule in the current year and the next 10 years.- An API call is made to endpoint
/getSumoHonbashoSchedule
of the webservice from Python Webservice Demo. The year argument is provided by a dropdown field. - The JSON data returned by the API call is populated to the frontend.
- An API call is made to endpoint
See "Environments" in this repository's Wiki for more information on the instances of this webapp.
Reference:
- At "Getting Started with Create React App" at this project's Wiki
- https://create-react-app.dev/docs/getting-started#scripts
Run the following command at the project root:
npm start
- Environment variables are configured by .env files in this app. You may override them with .env*.local files at your development machine. See here for details.
- They may also be added/overridden temporarily at the start command.
Note
- Run
npm install
before starting the app for the first time. - The automatic opening of the app on startup is disabled. Open it manually in a browser for development testing.
npm test
- Tests will be rerun whenever a file is updated.
- See the Watch Usage on the screen for operation.
The command above runs only tests affected by updated modules by default.
To run all test cases from the start:
npm run testAll
- Tests will be rerun whenever a file is updated.
- See the Watch Usage on the screen for operation.
npm run coverage