WinterJS
The JavaScript server that runs Service Workers according to the Winter Community Group specification.
Running WinterJS with Wasmer
The WinterJS server is published in Wasmer as wasmer/winter
.
You can run the HTTP server locally with:
wasmer run wasmer/winter --net --mapdir=tests:tests tests/simple.js
Where simple.js
is:
addEventListener('fetch', (req) => {
return "hello";
});
Note: The interface that is provided to Service Workers can be seen in
winter.d.ts
.
Running WinterJS Natively
You can run WinterJS natively by simply doing
cargo run -- tests/simple.js
And then access the server in https://localhost:8080/
How WasmerJS works
Wasmer Winter is powered by SpiderMonkey and Axum to bring a new level of awesomeness to your Javascript apps.
To compile the app to WebAssembly WinterJS is using the WASIX standard.