articles-api/README.md

31 lines
750 B
Markdown
Raw Permalink Normal View History

# Articles API
This repository showcases the use of the [aicra](https://git.xdrm.io/go/aicra) API engine.
### 1. download and build the package
```bash
go get -u git.xdrm.io/go/articles-api
```
### 2. launch in docker
Build the image :
```bash
$ docker build -t articles-api .
```
Run the container :
```bash
$ docker run -p 127.0.0.1:8888:4242 articles-api
2018-10-01 19:37:22 +00:00
```
You can now play with it with any regular REST API client at `127.0.0.1:8888`.
2018-10-01 19:37:22 +00:00
#### 2. Play with it
2018-10-01 19:37:22 +00:00
The [api.json](./api.json) configuration file defines what this api provides, refer to it to know what requests are available.
2018-10-01 19:37:22 +00:00
Examples :
- `GET /user/12` returns information about the user identified with 12.
- `POST /article` given required parameters creates a new article.