https://github.com/shavo007/mockoon-demo
showcase mocking API using mockoon
https://github.com/shavo007/mockoon-demo
api-rest docker mock-server mockoon oas3 swagger
Last synced: 3 months ago
JSON representation
showcase mocking API using mockoon
- Host: GitHub
- URL: https://github.com/shavo007/mockoon-demo
- Owner: shavo007
- Created: 2021-08-27T02:11:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-22T06:46:57.000Z (almost 2 years ago)
- Last Synced: 2024-12-25T22:24:11.982Z (4 months ago)
- Topics: api-rest, docker, mock-server, mockoon, oas3, swagger
- Language: Dockerfile
- Homepage: https://blog.shanelee.name/2021/08/29/mocking-a-rest-api-the-api-first-way-with-mockoon/
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mockoon-demo
showcase mocking API using mockoonBlog post: https://blog.shanelee.name/2021/08/29/mocking-a-rest-api-the-api-first-way-with-mockoon/
## dockerise version 1.4.0 (detached mode)```bash
npm update -g @mockoon/[email protected]
mockoon-cli dockerize --data ./Greetings_Mockoon.json --port 3000 --index 0 --output ./Dockerfile#Then manually amend the docker file to add in detached mode and specify the data arg. see [Dockerfile](./Dockerfile)
#To run with transaction log
docker run -p 3000:3000 mockoon-greeting-api```
## Kubernetes
```bash
docker build -t shanelee007/mockoon-greeting-api:1.0.0 .
#dry run (once only)
kubectl create deployment mockoon --image=shanelee007/mockoon-greeting-api:1.0.0 --dry-run=client --output=yaml > deployment.yaml
kubectl expose deployment mockoon --port=3000 --target-port=3000 --type=NodePort --dry-run=client --output=yaml > svc.yaml
kubectl apply -f deployment.yaml
kubectl apply -f svc.yaml
kubectl describe service mockoon
#access locally on node port
#inspect logs of the pod
kubectl logs -f
```