Skip to content

Commit

Permalink
[#85] Updated README
Browse files Browse the repository at this point in the history
Problem: 
New functionality - new guide

Solution:
Updated readme on how to boot a `coffer-server`
  • Loading branch information
Kariel-Myrr committed Jul 20, 2022
1 parent 75b814d commit 508c2e0
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,33 @@ The coffer CLI will look for its configuration file in the following order:

### Web API

Coffer also has a Web API. Currently, it runs on `localhost:8081`. In the future we could configure this but at this moment we can't.
Coffer also has a Web API. It runs on `localhost:$your_port`.
Port can be specified via:
- Cmd line option: `--port`
- Environment varieble `"COFFER_SERVER_PORT"`

You can run server in the following ways:
1. Cabal
Examples:
1. Stack
```shell
$ cabal run coffer-server
$ stack run -- coffer-server --port=8081
```
2. Stack

```shell
$ export COFFER_SERVER_PORT=8081
$ stack run coffer-server
```

2. Cabal
```shell
$ cabal run -- coffer-server --port=8081
```

```shell
$ export COFFER_SERVER_PORT=8081
$ cabal run coffer-server
```


Documentation for Web API endpoints and their return types could be generated via `servant-openapi3`. (TODO: write something about docs generation after [#114](https://github.com/serokell/coffer/issues/114) is resolved).

#### Configuration
Expand Down

0 comments on commit 508c2e0

Please sign in to comment.