$ git clone https://github.com/mirage/mirage-www.git
$ sudo bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)"
$ opam init
$ opam update && opam upgrade
$ opam switch create 4.14.0 ocaml-base-compiler.4.14.0
$ opam repo add mirage-dev https://github.com/mirage/mirage-dev.git
$ opam install "mirage>=4.0.0"
$ cd mirage-www
$ mirage configure -f mirage/config.ml -t hvt
$ opam pin git+https://github.com/tmattio/opam-tailwindcss.git
$ make depends
Answer yes to Opam plugin “monorepo” may require upgrading/reinstalling. Reinstall the plugin on the current switch? [Y/n] y
.
$ dune build mirage/
$ sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 10.0.0.2:80
You can also add the above iptables entry to bridge.sh
script so that everytime you reboot and run bridge.sh script, the firewall is updated.
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 10.0.0.2:80
If running on your computer, create the tap0 interface:
$ sudo ip tuntap add tap0 mode tap
$ sudo ip addr add 10.0.0.1/24 dev tap0
$ sudo ip link set dev tap0 up
$ sudo ~/bridge.sh
$ solo5-hvt --net:service=tap0 -- ./mirage/dist/www.hvt --ipv4-gateway=10.0.0.1
You can open a browser on your system/laptop with IP address of the Raspberry Pi and default port 80, and you should be able to see the mirage-www htdocs.
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing