Skip to content

Latest commit

 

History

History
71 lines (48 loc) · 1.32 KB

README.md

File metadata and controls

71 lines (48 loc) · 1.32 KB

spray-jwt-example provides an example service for spray-jwt.

This example provides a simple interface to authenticate users and records messages.

Prerequisites

You need the following software installed,

Building

  1. Clone the repository https://github.com/kikuomax/spray-jwt.git and move down to it.

    git clone https://github.com/kikuomax/spray-jwt.git
    cd spray-jwt
  2. Move down to the example directory.

    cd example
  3. Builds the project by sbt.

    sbt compile
  4. Install necessary modules for Node.js.

    npm install

Running a service

The example consists of an API and client interface services.

  1. Runs an API service on sbt.

    sbt
    > re-start

    The API service will be listening at http://localhost:9090.

  2. Runs a client interface service on Node.js.

    npm start

    The client interface service will be listening at http://localhost:8080.

  3. Open http://localhost:8080 on your browser.

The following pairs of username and password can be used,

Username Password Privilege
John p4ssw0rd RW
Alice key RW
Bob chiave R