Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
Expand All @@ -28,3 +29,4 @@ bridge*.tar.gz
checksums.txt

*.pem
localhost+2*
46 changes: 36 additions & 10 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,41 @@ of having to re-authenticate whenever you make a change or refresh the page):

## HTTPS

For development, you can enable HTTPS on localhost without a certificate for
Chrome by pasting the following into the URL bar:
For development, Bridge will not run unless you access localhost via HTTPS. To do this, you will want to set up a self-signed cert using `mkcert`:

1. Install `mkcert`:
```
chrome://flags/#allow-insecure-localhost
# on MacOS using homebrew
brew install mkcert

# on Linux using apt # TODO Confirm functionality
sudo apt install libnss3-tools
wget -O mkcert https://github.com/FiloSottile/mkcert/releases/latest/download/mkcert-v*-linux-amd64
chmod +x mkcert
sudo mv mkcert /usr/local/bin/
```

In Firefox, you may need to allow connecting to the unsecured local node
websocket. Do this by going to `about:config` and setting the
`network.websocket.allowInsecureFromHTTPS` flag to `true`.
2. Create certificate authority:
```
# install local cert authority
mkcert -install
```

3. Generate localhost Cert:
```
# Navigate to your bridge project directory
cd /path/to/urbit/bridge

# Generate certificate for localhost
mkcert localhost 127.0.0.1 ::1
```

Additionally you need to run with the `HTTPS` environment variable set to
`true`. Note that `npm run pilot` will handle this automatically.
This creates two files:
- `localhost+2.pem` (certificate)
- `localhost+2-key.pem` (private key)


Note: as of 3.3.0, Bridge is deprecating explicit support for Firefox. Privacy focused users are recommended to use Brave Browser.

## WalletConnect

Expand Down Expand Up @@ -178,14 +200,18 @@ Start a local fake ship from the master branch in the [urbit repo](https://githu
:: Run these in the dojo:
::
> |mount /=base=
> :azimuth %resub
> |nuke %azimuth
> |rein %base [%.y %azimuth]
> :azimuth|watch 'http://0.0.0.0:8545' %local
> :azimuth %resub
> :azimuth &azimuth-poke [%kick ~]
> |rein %base [& %roller] [& %roller-rpc] [& %azimuth-rpc]
> :roller|local
> :roller|setkey '58d62eb79797502bc0f66cd3e7a49d00287bff53a2734b799ef09cb746340ed0'
> :roller|quota 9.999
> |cors-approve 'https://127.0.0.1:3000'
:: If you run into issues, also add 'https://localhost:3000' the the eyre CORS approvals
> |eyre/cors/approve 'https://127.0.0.1:3000'
::
:: Once L2 txs have been sent via Bridge, this will manually commit and batch them, avoiding waiting for the timer
::
> :roller|commit
Expand Down
Loading