Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skoslitz/lid-backend
content api for lid
https://github.com/skoslitz/lid-backend
Last synced: 5 days ago
JSON representation
content api for lid
- Host: GitHub
- URL: https://github.com/skoslitz/lid-backend
- Owner: skoslitz
- Created: 2016-05-09T08:45:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-11T19:50:28.000Z (over 6 years ago)
- Last Synced: 2024-08-01T12:22:49.394Z (3 months ago)
- Language: Go
- Size: 8.48 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-starred - skoslitz/lid-backend - content api for lid (others)
README
# lid-backend
## content api for lid online editor
### Installation:
- First, install [golang](https://golang.org/doc/install#install)
- Then: `go get github.com/skoslitz/lid-backend`
- Edit edit `config.toml` with required path infos
- Compile with `go build`
- Run with `./lid-backend`### Windows Build
- Rename lid-backend._syso to *.syso
- Compile with `env GOOS=windows GOARCH=amd64 go build -o lid-backend.exe`
- NOTE: If you move lid-backend exec, always take config.toml along### Endpoints:
#### Basepath: /api
#### Directories (Items in your repo `/content` folder)
- Read Dir: GET /dir/{dirname}/
- Read Region related content Filter: GET /regionen/{filename.md}/[themen exkursionen]
- Create Dir: POST /dir/{dirname}
- Update Dir: OPTIONS /dir/{dirname}
- Delete Dir: DELETE /dir/{dirname}Example*: `OPTIONS dir/themen --form dir[name]="themen-neu"`
*: under usage of [http-prompt](https://github.com/eliangcs/http-prompt)
#### Pages
- Read Page: GET /page/{path}/
- Create Page: POST /page/{path}
- Update Page: OPTIONS /page/{path}
- Delete Page: DELETE /page/{path}Example*: `OPTIONS page/themen/77_B_000.md --form page[meta]={\"title\": \"Beitragstitel\"} page[content]="text string"`
Example (REST client usage):
`POST page/themen/79_B_100-titel.md`
Raw payload:
`{ "page": { "id": "77_B_100-titel.md", "type": "themen", "links": {}, "attributes": {"metadata": {"title": "79_B_100-titel"}} }}`