adding script to launch ffox
This commit is contained in:
parent
8467d33185
commit
0de598c517
41
README.org
41
README.org
@ -41,6 +41,47 @@ Recommended way is via curl, see the [[https://esbuild.github.io/getting-started
|
|||||||
curl -fsSL https://esbuild.github.io/dl/v0.19.7 | sh
|
curl -fsSL https://esbuild.github.io/dl/v0.19.7 | sh
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Now that you have ~esbulid~, install it in your local path if you fancy.
|
||||||
|
We can start a server from here.
|
||||||
|
#+name: start server
|
||||||
|
#+begin_src shell
|
||||||
|
esbuild --serve=8888 --servedir=.
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS: start server
|
||||||
|
: > Local: http://127.0.0.1:8888/
|
||||||
|
: > Network: http://192.168.1.140:8888/
|
||||||
|
: > Network: http://192.168.122.1:8888/
|
||||||
|
: > Network: http://10.0.3.1:8888/
|
||||||
|
: > Network: http://172.17.0.1:8888/
|
||||||
|
** HTTPS
|
||||||
|
Local servers are considered secure by default. There is no need to
|
||||||
|
over-engineer the setup. At least at this point.
|
||||||
|
As for CORS and other security rules, we will fix them as they arise.
|
||||||
|
No need to fix a problem until it actually becomes a pbm. The solution will be
|
||||||
|
measured agains the reality of the situation. This is the sure way to avoid
|
||||||
|
scope creeps.
|
||||||
|
** Firefox
|
||||||
|
Because you don't want to share the development setup with other projects or
|
||||||
|
the usual browsing, e.g. same cookie origins, indexdb, and localstorage, ...
|
||||||
|
we can launch firefox with a dedicated profile.
|
||||||
|
Assuming we all know where our firefox is launched from.
|
||||||
|
#+name: firefox launcher
|
||||||
|
#+begin_src shell
|
||||||
|
#!/bin/bash
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
DATA_DIR="$(mktemp -d -t 'firefox_unsafe_data_dir.XXXXXXXXXX')"
|
||||||
|
/usr/local/bin/firefox/firefox-bin \
|
||||||
|
-profile $DATA_DIR \
|
||||||
|
-no-remote \
|
||||||
|
-devtools \
|
||||||
|
-url http://localhost:8888 \
|
||||||
|
> /dev/null 2>&1 &!
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS: firefox launcher
|
||||||
|
|
||||||
* Footnotes
|
* Footnotes
|
||||||
|
|
||||||
[fn:1]Which causes 2 problems:
|
[fn:1]Which causes 2 problems:
|
||||||
|
10
firefox.sh
Normal file
10
firefox.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
DATA_DIR="$(mktemp -d -t 'firefox_unsafe_data_dir.XXXXXXXXXX')"
|
||||||
|
/usr/local/bin/firefox/firefox-bin \
|
||||||
|
-profile $DATA_DIR \
|
||||||
|
-no-remote \
|
||||||
|
-devtools \
|
||||||
|
-url http://localhost:8888 \
|
||||||
|
> /dev/null 2>&1 &!
|
Loading…
Reference in New Issue
Block a user