Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Payment Server

Setup

Make sure you've installed docker. I suggest you install Docker Desktop.

We defined the server's endpoint /api/payment_methods/ in ./oas.yml. It is written in open api specification

Option a: docker compose

  1. Run Docker Desktop or docker engine
  2. Make sure you have docker compose installed
  3. From within this directory (cd ./server), run the following command to spin up the server: docker compose up
  4. This commmand will spin up one container: dev_server_api is the development server. It will validate your requests, yield errors, and yield random successful request bodies. You can access it through http://0.0.0.0:8080/

Here's an example of what you should see: CleanShot 2022-07-13 at 17 30 31@2x

Option b: docker

  1. Run Docker Desktop or docker engine
  2. Make sure you have docker installed
  3. Run the docker container: docker run -v $PWD/oas.yml:/app/oas.yml -p 8080:808 stoplight/prism mock -h 0.0.0.0 -p 8080 -d /app/oas.yml
  4. The server will run on http://0.0.0.0:8080/

Here's an example of what you should see: CleanShot 2022-07-13 at 17 42 46@2x