Skip to content

Commit

Permalink
docs: add new section on environment variable config via HOST and POR…
Browse files Browse the repository at this point in the history
…T env vars
  • Loading branch information
vicchi committed Jul 16, 2020
1 parent f9d2517 commit 39e6274
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,21 @@ note: the lat/lon values you provide are in order to disambiguate the street, th
### Start the web server
> run a web server which exposes the search APIs via an HTTP interface
note: you can set an environment variable named 'PORT' to change the port number.
```bash
./interpolate server address.db street.db

server listening on port 3000
```

#### Configuration via Environment Variables

The API supports additional environment variables that affect its operation:

| Environment Variable | Default | Description |
| -------------------- | ------- | ----------- |
| `HOST` | `undefined` | The network address that interpolation will bind to. Defaults to whatever the current Node.js default is, which is currently to listen on `0.0.0.0` (all interfaces). See the [Node.js Net documentation](https://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback) for more information. |
| `PORT` | `3000` | The TCP port that interpolation will use for incoming network connections |

### GET /search/{format}
> search the db for an address, return an interpolated value if an exact match does not exist
Expand Down

0 comments on commit 39e6274

Please sign in to comment.