Skip to content

Commit

Permalink
docs: adds a TL;DR; to usage
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoliveira authored Apr 9, 2024
1 parent 4ad6502 commit c0181e4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,18 @@ Make sure you have `$GOPATH/bin` in your path: `export PATH=$PATH:$GOPATH/bin`

## Usage

### TL;DR;
```bash
python3 -m http.server 8800 &
echo "http://localhost:8800 mylocalsite" > .ergo
ergo local & # may need sudo since it binds to port 80
curl http://mylocalsite.localhost
```
---

Ergo looks for a `.ergo` file inside the current directory. It must contain the names and URL of the services following the same format as `/etc/hosts` (`domain`+`space`+`url`). The main difference is it also considers the specified port.

### Subdomains to http://localhost
### Subdomains for localhost

Run `ergo local` it'll attempt to bind to `localhost:80` and listen for requests to your services as "subdmains" eg. `http://serviceone.localhost` and `http://servicetwo.localhost`. (Check [examples](https://github.com/cristianoliveira/ergo/tree/master/examples) for more)

Expand Down

0 comments on commit c0181e4

Please sign in to comment.