From c37675fcd7790d34415edb3979bfe4ef2d25d986 Mon Sep 17 00:00:00 2001 From: Tim Mickel <tim.mickel@gmail.com> Date: Wed, 10 Aug 2016 12:04:02 -0400 Subject: [PATCH] Update README.md for `make serve` and playground --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 6dabf3716..1b7197870 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ npm install https://github.com/LLK/scratch-vm.git ``` ## Setup +For an extended setup example, check out the /playground directory, which includes a fully running VM instance. ```js var VirtualMachine = require('scratch-vm'); var vm = new VirtualMachine(); @@ -23,6 +24,16 @@ flyoutWorkspace.addChangeListener(vm.flyoutBlockListener); // Run threads vm.runtime.start(); ``` +## Development Server and Playground +For convenience, we've included a development server with the VM. This is useful because the VM can take advantage of executing in a WebWorker, which is not permitted in a local file. To start the server, run: + +```bash +make serve +``` +and go to [http://localhost:8080/](http://localhost:8080/) - you will be redirected to the playground, which demonstrates various tools and internal state. + + + ## Standalone Build ```bash