mirror of
https://github.com/vlang/v.git
synced 2025-09-09 07:15:50 -04:00
examples: show how to use a v file server for the wasm version of 2048, instead of emrun
This commit is contained in:
parent
8241f22116
commit
fa8c5e369a
@ -51,5 +51,12 @@ Compile & run the game with `./v run examples/2048`
|
||||
emrun examples/2048/index.html
|
||||
```
|
||||
|
||||
Once you have run the game, you can make changes,
|
||||
then just recompile (step 3), and refresh the game in your browser.
|
||||
If you prefer, instead of `emrun`, you can start a simple V http file server:
|
||||
```sh
|
||||
v -e 'import net.http.file; file.serve(folder: "examples/2048")'
|
||||
```
|
||||
and then open http://127.0.0.1:4001/ in your browser.
|
||||
|
||||
Once you have opened the game in your browser, you can make changes to
|
||||
the V source, then recompile (step 3), and refresh the browser window
|
||||
with the game, to see their effect.
|
||||
|
Loading…
x
Reference in New Issue
Block a user