Skip to content

jolocom/jolocom-example-service

Repository files navigation

Jolocom Example Service

The "Jolocom Example Service" is a reference application created to show how to develop applications using 'Jolocom SDK' along with 'Express framework' or even be the starting point for your concrete solution.

ℹ️ This application uses "API First" approach by defining contract with help of "OpenAPI Specification 3.0" located in 'openapi.yaml'.

Requirements

  • "node": ">=10"

Usage

To build your application on top of "Jolocom Example Service" you need just follow 5 simple steps:

  1. Fork it (rename if required).
  2. Clone forked repository.
  3. Install dependencies.
  4. Configure application.
  5. Run it.

Installation

Npm:

npm install

Yarn:

yarn

Configuration

First of all you need to create .env file with required environment variables (.env.dist is an example of .env).

For simplification of creation default .env file, was added command under the "scripts" definition:

Npm:

npm run dotenv-init

Yarn:

yarn run dotenv-init

⚠️ The main application configuration definition located in './src/config/config.ts'

Running the application

Npm:

npm run start

Yarn:

yarn run start

Or run in debug mode (after run in debug mode you can attach debugger):

Npm:

npm run debug

Yarn:

yarn run debug

🎉 At this point you have configured and working application with set of predefined endpoints which are covering most of available interactions supported by the 'Jolocom SDK'.

To see list of all available endpoints you can use 'Swagger UI' (sandbox) which can be reached on http://localhost:9000/docs (with default server configuration).

Structure

Here some structure representation in 'UML':

Structure

License

Apache-2.0

Releases

No releases published

Packages

No packages published