Skip to content

A small all-one-one project which includes an embedded java backend, ReactJS fronted, with JWT token authentication

Notifications You must be signed in to change notification settings

nzhong/react-jwt-jjserv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

README

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.

What is this?

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

How to run?

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```

About

A small all-one-one project which includes an embedded java backend, ReactJS fronted, with JWT token authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages