https://github.com/rytsh/indigo
dynamic json and file server
https://github.com/rytsh/indigo
golang indigo inner json json-api serve-files server spa
Last synced: 5 months ago
JSON representation
dynamic json and file server
- Host: GitHub
- URL: https://github.com/rytsh/indigo
- Owner: rytsh
- License: mit
- Created: 2020-04-15T22:41:05.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-17T17:08:36.000Z (about 4 years ago)
- Last Synced: 2024-06-20T08:20:54.639Z (10 months ago)
- Topics: golang, indigo, inner, json, json-api, serve-files, server, spa
- Language: Go
- Homepage: https://rytsh.github.io/indigo/
- Size: 378 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://goreportcard.com/report/github.com/rytsh/indigo)
[](https://raw.githubusercontent.com/rytsh/indigo/master/LICENSE)
[](https://discordapp.com/channels/706631996478324898)
[](https://hub.docker.com/r/ryts/indigo)
[](https://rytsh.github.io/indigo/)
[](https://coveralls.io/github/rytsh/indigo?branch=master)
Serve any json file with GET, POST, PUT, PATCH or DELETE request data, even most inner object and root path.
Serve folder with SPA, browsable support options.---
## Notes
Indigo hold all data in memory and case sensetive like what you see in json file.
Add an `id` field when PUT, POST, PATCH if you working on an array. indigo not put an auto-id. `id` field help us to find data in array.
If same URL uses, order is UI > API > FILE
I will add more useful stuff in it and write test cases.
If you see any error or wants to support something write me.## Options
```txt
indigo [OPTIONS]
Generate RestAPI with JSON file and serve folderOptions:
--port, -P <3000>
Set port, tool default is '3000'
--host, -H
Set host, tool default is 'localhost'--location <./data.json>
Change save location
--api-path
Set API path prefix
--ui-path
Set UI path default '/indigo'--folder <./public>
Serve folder
--folder-path
Set Folder path, works with folder option
--browsable
Enable folder browsable
--spa
Enable SPA mode
--no-index
Stop redirect to index--no-api
Close API server, use just serve folder
--no-ui
Close UI server--auth-basic
Enable basic authentication with username and password--no-color
Disable color output-v, --version
Show version number
-h, --help
Show helpExamples:
indigo --api-path api/v1 --auth-basic user:pass test/users.json
```## Build
You can download binary form in releases.
Or you can build with show PLATFORMS, each platform seperated by `,` and each arch by `-`.
```shell
PLATFORMS="windows:amd64,linux:arm64-amd64,darwin:amd64" ./build.sh --build --clean
```Check list of platforms and archs here
---
## License
Indigo is [MIT licensed](./LICENSE).
### Libraries Used
[github.com/fatih/color](https://github.com/fatih/color)