Skip to content

Commit fa8c5e3

Browse files
committed
examples: show how to use a v file server for the wasm version of 2048, instead of emrun
1 parent 8241f22 commit fa8c5e3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

examples/2048/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ Compile & run the game with `./v run examples/2048`
5050
```sh
5151
emrun examples/2048/index.html
5252
```
53+
54+
If you prefer, instead of `emrun`, you can start a simple V http file server:
55+
```sh
56+
v -e 'import net.http.file; file.serve(folder: "examples/2048")'
57+
```
58+
and then open http://127.0.0.1:4001/ in your browser.
5359

54-
Once you have run the game, you can make changes,
55-
then just recompile (step 3), and refresh the game in your browser.
60+
Once you have opened the game in your browser, you can make changes to
61+
the V source, then recompile (step 3), and refresh the browser window
62+
with the game, to see their effect.

0 commit comments

Comments
 (0)