https://github.com/open-southeners/mok
☕️ Mock APIs as files with a NextJS routing directory style
https://github.com/open-southeners/mok
mock-api mock-api-tool mock-server tool
Last synced: 12 months ago
JSON representation
☕️ Mock APIs as files with a NextJS routing directory style
- Host: GitHub
- URL: https://github.com/open-southeners/mok
- Owner: open-southeners
- License: mit
- Created: 2025-01-22T23:23:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-23T01:10:57.000Z (over 1 year ago)
- Last Synced: 2025-03-23T20:13:07.093Z (over 1 year ago)
- Topics: mock-api, mock-api-tool, mock-server, tool
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Mok  [](https://codecov.io/gh/open-southeners/mok) [](https://vscode.dev/github/open-southeners/mok)
===
Mock APIs as files with a NextJS routing directory style
## Getting started
Download the executable from the [latest release](https://github.com/opensoutheners/mok/releases/latest).
Run the following under a folder with some `.json` files:
```sh
mok
```
Then you can go to [http://localhost:8080](http://localhost:8080) and check for yourself
You can specify the address and the port to listen:
```sh
mok --listen 0.0.0.0 --port 80
```
Or use a different folder than the current:
```sh
mok path/to/my/json/files
```
### Random responses
To be able to randomise the content of our JSON files we can use all functions from [gofakeit](https://github.com/brianvoe/gofakeit?tab=readme-ov-file#functions) and passed request data.
Check [example](./example) folder for more info.
## Partners
[](https://getskore.com)
## License
This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).