This repository contains a Camouflage-based mock server used for training purposes.

Setup

Install the dependencies:

yarn

Usage

To start the mock server, use

yarn start

It will come up on http://localhost:8080.

Predefined routes

Some predefined routes are in place to support training:

  • POST /login: Mocks a login and returns an access token:

    $ curl -X POST \
      --data '{"username": "user", "password": "pw"}' \
      http://localhost:8080/login
    
    { "accessToken": "abc" }
  • GET /profile: Returns a mock user profile:

    $ curl http://localhost:8080/profile
    
    { "profile": { "firstName": "John", "lastName": "Doe", "jobTitle": "COBOL Architect" }}

Adding new routes

To add new routes, use the mock folder.