# jsgo
**Repository Path**: mirrors_dave/jsgo
## Basic Information
- **Project Name**: jsgo
- **Description**: GopherJS compiler, serving framework and CDN.
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-11-23
- **Last Updated**: 2026-05-17
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 2020 Update
* The compile.jsgo.io and play.jsgo.io services have been shut down.
* Anything deployed to jsgo.io or pkg.jsgo.io will continue to work fine.
I created the jsgo.io system several years ago, and it costs about $150/month to host which I pay
personally. I'm tightening up my finances right now, so this outgoing had to stop.
If anyone would like to host it for me (it runs on a single GKE `n1-standard-2` instance), please
let me know and we can get it back online!
I had a plan for a big rewrite that would make is possible to run on App Engine, thus reduce the
cost to almost zero. Unfortunately this is something I'm hesitant to start, because it seems that
Go on the client is moving away from GopherJS and towards WASM.
# jsgo.io
[GopherJS](https://github.com/gopherjs/gopherjs) is an amazing tool, but I've always been frustrated
by the size of the output. All the packages in the dependency tree (including the standard library)
are compiled to a single JS file. This can cause the resultant file to be several megabytes.
I've always thought a better solution would be to split the JS up by package and store it in a centralized
CDN. This architecture would then allow aggressive caching: If you import `fmt`, it'll be delivered as
a separate file `fmt.js`, and there's a good chance some of your visitors will already have it in their
browser cache. Additionally, incremental updates to your app will only change the package you're updating,
so your visitors won't have to download the entire dependency tree again.
`jsgo.io` makes this simple.
### Features
* Compiles Go to JS using [GopherJS](https://github.com/gopherjs/gopherjs).
* Splits the JS up by Go package.
* Stores the JS in a CDN for you (GCP / Cloudflare).
* Aggressively caches the JS.
* Creates a page on `jsgo.io` that runs the JS.
* Creates a single `loader JS` file you can use on your site.
### How it works
Visit `https://compile.jsgo.io/` to compile or re-compile your package. Here's a [very simple
hello world](https://compile.jsgo.io/github.com/dave/jstest). Just click `Compile`.
After it's finished, you'll be shown a link to a [page that runs the code](https://jsgo.io/dave/jstest)
on `jsgo.io`. The compile page will also give you a link to a single JS file on `pkg.jsgo.io` - this
is the `loader JS` for your package. Add this in a `