diff --git a/README.md b/README.md index 1b7e454..1f4d6d5 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,28 @@ # xdrm go framework -### 1. Setup +### 1. Download and build the package -You need a `redis` server running, if you don't have it, you can simply use a docker container for it with `docker run -p 6379:6379 -d redis`. - -All commands above must be launched from the root of this repository. - -### 2. Build type checkers, controllers, middlewares - -Type checkers, controllers and middlewares have to be compiled beforehand. A build command exists for that purpose. ```bash -aicra +go get -u git.xdrm.io/go/tiny-url-ex ``` -### 3. Launch the api +### 2. launch the server ``` -$ go run ./main.go +$ go run . ``` Now you can play with it with any regular REST API client at `127.0.0.1:4242`. ##### 1. Get an authentication token + - `POST /token/admin` to get an authentication token. #### 2. Manage tiny urls -> The authentication token must be set inside the `Authorization` header of each request except for the `GET` method. +> The authentication token must be set inside the `Authorization` header of each request except for the `GET` method which does not require you to be authenticated. - `POST /` to set a new tiny-url for the url `` to redirect to the FORM variable named `target`. Also you can send the FORM data as _x-www-form-urlencoded_, _form-data_ or _json_. - `PUT /` to update an existing tiny-url for the url `` to redirect to the FORM variable named `target`. - `DELETE /` to delete the tiny-url for ``. -- `GET /` to redirect to the target of an existing url `. \ No newline at end of file +- `GET /` to redirect to the target of an existing url ``. \ No newline at end of file