https://github.com/chaewonkong/go-json-server
a simple go server that returns json in db directory.
https://github.com/chaewonkong/go-json-server
json server
Last synced: about 1 month ago
JSON representation
a simple go server that returns json in db directory.
- Host: GitHub
- URL: https://github.com/chaewonkong/go-json-server
- Owner: chaewonkong
- Created: 2023-01-19T05:26:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-19T07:28:52.000Z (over 3 years ago)
- Last Synced: 2024-06-19T22:13:52.391Z (about 2 years ago)
- Topics: json, server
- Language: Go
- Homepage:
- Size: 3.88 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 📦 go-json-server
Simple server that replies json from file.
## How to use
1. create `db` directory
2. add json file to ./db directory. name of the file will be the endpoint and content of the file will be the response.
3. just run the following command:
```shell
$ curl -L -o app https://github.com/chaewonkong/go-json-server/raw/main/bin/go-json-server
$ chmod 777 app
$ ./app
```
This server will automatically finds files in ./db directory and serves it.
your server will be at `localhost:8080`
👨💻 Happy Hacking~