Skip to content

A simple skeleton of a React Redux application with a Java backend

Notifications You must be signed in to change notification settings

ubuntolog/minimal-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal React Application

This is a simple web application that has a Java backend and a React-based frontend. The backend uses a simple H2 database (stored in a file). The main page contains a minimal example of a D3 bar chart.

Running

First, you need to build the frontend. Go to src/main/resources/frontend folder and run (npm and node are required):

make dependencies

While working on the frontend it is better to turn on the development mode, since it will refresh your browser after each change in the source code:

make run_webui_dev_server

If you need to add a new dependency, you should modify src/main/resources/frontend/package.json. After that remove old dependencies by removing src/main/resources/frontend/webui/node_modules folder. Rerun:

make dependencies

To run the backend use the following options (Java 8 is required):

server minimal-react.yaml

Configuration

Configuration options are stored in minimal-react.yaml

Option Description
version version number
dbFolder path to the database file
dbUser database user name
dbPassword database password

API endpoint

URL Method Description
/info GET information about the API
/booking GET list of all bookings in JSON
/booking POST adding a new booking
/booking/{id} GET getting a particular booking by Id

About

A simple skeleton of a React Redux application with a Java backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published