This repo is based on the following two repos:
- jj-serv: A small embedded java server, which can serve static content, and REST APIs. It's based on Jetty + Jersey, thus the name JJ.
- react-webpack-minimal: A simple starter project for a webpack build of ReactJS.
This project adds the following items to the above two base repo:
- (non rackt/react-router) Routing in ReactJS by hash (#)
- login form
- JWT token authentication (JWT=Json Web Token).
warning: just 'mvn clean package' will not work here. I have not integrated webpack/grunt workflow, so there are some manual steps needed.
cd src/main/resources/webapps/HTML/
npm init
npm install webpack -g
npm install --save-dev babel babel-core babel-preset-react babel-loader
npm install --save-dev react react-dom
webpack
This will generate bundle.js in the src/main/resources/webapps/HTML/ directory, which test.html will use. * ```cd ../../../../../``` * ```mvn clean package``` * ```java -jar target/app.jar```
- Point browser to: http://localhost:6060/static/test.html
- use one of the following to login
- guest/welcome
- hello/world
- world/peace