spray-jwt-example provides an example service for spray-jwt.
This example provides a simple interface to authenticate users and records messages.
You need the following software installed,
-
Clone the repository
https://github.com/kikuomax/spray-jwt.gitand move down to it.git clone https://github.com/kikuomax/spray-jwt.git cd spray-jwt -
Move down to the
exampledirectory.cd example -
Builds the project by sbt.
sbt compile
-
Install necessary modules for Node.js.
npm install
The example consists of an API and client interface services.
-
Runs an API service on sbt.
sbt > re-startThe API service will be listening at
http://localhost:9090. -
Runs a client interface service on Node.js.
npm start
The client interface service will be listening at
http://localhost:8080. -
Open
http://localhost:8080on your browser.
The following pairs of username and password can be used,
| Username | Password | Privilege |
|---|---|---|
| John | p4ssw0rd | RW |
| Alice | key | RW |
| Bob | chiave | R |