top | item 33907785

Fermyon Spin JavaScript and TypeScript SDK

3 points| nitsky | 3 years ago |fermyon.com

2 comments

order
[+] nitsky|3 years ago|reply
I wonder how using a typical isomorphic React app performs on Fermyon using JS running with QuickJS vs on Vercel, Cloudflare Workers, or Netlify. Has the Fermyon team tested this?
[+] joel_dice|3 years ago|reply
There's a simple example of using React server-side rendering here: https://github.com/fermyon/spin-js-sdk/tree/main/examples/ja.... We haven't tried anything more advanced than that, yet, but a full-blown isomorphic app should work fine in theory.

The main limitation at the moment is that we only support a handful of Web APIs (e.g. `fetch`, `URL`, etc.) and NodeJS APIs (e.g. `readFile`), as well as QuickJS's built-in ES2020 APIs, so if you try to run an existing app you may find it needs a Web API we don't yet support. If so, please feel free to open an issue on the `spin-js-sdk` repo.