This repository contains a Camouflage-based mock server used for training purposes.
Install the dependencies:
yarn
To start the mock server, use
yarn start
It will come up on http://localhost:8080.
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" }}
To add new routes, use the mock
folder.