Update readme
This commit is contained in:
parent
f1f2012a95
commit
2faebcd5b4
15
README.md
15
README.md
|
|
@ -20,7 +20,11 @@ Start the HTTP server:
|
||||||
go run cmd/app/main.go --mermaid=./mermaidcli/node_modules/.bin/mmdc --in=./in --out=./out
|
go run cmd/app/main.go --mermaid=./mermaidcli/node_modules/.bin/mmdc --in=./in --out=./out
|
||||||
```
|
```
|
||||||
|
|
||||||
Send CURL request to generate a diagram via `POST`:
|
### Diagram creation
|
||||||
|
|
||||||
|
#### POST
|
||||||
|
|
||||||
|
Send a CURL request to generate a diagram via `POST`:
|
||||||
```
|
```
|
||||||
curl --location --request POST 'http://localhost:80/generate' \
|
curl --location --request POST 'http://localhost:80/generate' \
|
||||||
--header 'Content-Type: text/plain' \
|
--header 'Content-Type: text/plain' \
|
||||||
|
|
@ -33,9 +37,16 @@ curl --location --request POST 'http://localhost:80/generate' \
|
||||||
'
|
'
|
||||||
```
|
```
|
||||||
|
|
||||||
Or send CURL request to generate a diagram via `GET`... send in url encoded data under the `data` query param:
|
#### GET
|
||||||
|
|
||||||
|
Send a CURL request to generate a diagram via `GET`... send in url encoded data under the `data` query param:
|
||||||
```
|
```
|
||||||
curl --location --request GET 'http://localhost:80/generate?data=graph%20LR%0A%0A%20%20%20%20A--%3EB%0A%20%20%20%20B--%3EC%0A%20%20%20%20C--%3ED%0A%20%20%20%20C--%3EF%0A'
|
curl --location --request GET 'http://localhost:80/generate?data=graph%20LR%0A%0A%20%20%20%20A--%3EB%0A%20%20%20%20B--%3EC%0A%20%20%20%20C--%3ED%0A%20%20%20%20C--%3EF%0A'
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### Caching
|
||||||
|
|
||||||
|
All generated diagram input and output will be cached for 1 hour. The cache time is reset whenever a cached diagram is accessed.
|
||||||
|
|
||||||
Loading…
Reference in New Issue