Running locally

September 27, 2018 ยท View on GitHub

compile.jsgo.io and play.jsgo.io have a fully featured offline mode that can be used for offline development.

Offline mode simulates the Google Data Store and Google Storage Buckets by using a temporary directory, which defaults to ~/.jsgo-local. You can change the location in constants.go.

Instead of getting git repos from the internet, it uses the repos in your GOPATH, so any repo requested that's not in your GOPATH will fail.

ProductionLocal
git from the internetrepos in your GOPATH
google datastorejson files in temporary dir
google storagefiles in temporary dir

Setup

Get the latest source:

go get -u github.com/dave/jsgo/...

Initialise the project:

cd $GOPATH/src/github.com/dave/jsgo/initialise

go generate

Start the server:

cd $GOPATH/src/github.com/dave/jsgo/server/main

go run -tags "norwfs dev local" main.go

Open a browser and head to localhost:8080 to open the jsgo playground.

This will also start some other servers:

LocalProduction equivalent
localhost:8080play.jsgo.io
localhost:8081compile.jsgo.io
localhost:8082frizz.io
localhost:8083wasmgo.jsgo.io
localhost:8091src.jsgo.io
localhost:8092pkg.jsgo.io
localhost:8093jsgo.io