From fa8c5e369ae7934eb7c467ff1773d8356b439073 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 24 Feb 2025 15:25:16 +0200 Subject: [PATCH] examples: show how to use a v file server for the wasm version of 2048, instead of emrun --- examples/2048/README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/2048/README.md b/examples/2048/README.md index 3812d6faf..5cfe264a5 100644 --- a/examples/2048/README.md +++ b/examples/2048/README.md @@ -50,6 +50,13 @@ Compile & run the game with `./v run examples/2048` ```sh emrun examples/2048/index.html ``` + + 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 run the game, you can make changes, -then just recompile (step 3), and refresh the game 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. -- 2.39.5