actually-serverless
actually-serverless copied to clipboard
Dynamic HTTP Endpoints in your Browser
Actually Serverless - Dynamic HTTP Endpoints in your Browser
Hosted here.
- Actually Serverless - Dynamic HTTP Endpoints in your Browser
- Quick Start:
- Detailed Guide
- Why is it useful?
- Secure origin
- Testing Cloud Functions
- Limitations
- Trouble Shooting
- Comparison to Serevefolder.dev
Simarly to other "serverless" platforms, this allows you to host dynamic HTTP endpoints and static files.
Unlinke most of these platforms, no servers are necessary beyond the initial application load. Everyting is hosted locally within the browser using a service worker.
This is not actually serverless, but it's about as close as your can theoretically get.
Quick Start:
- Click [] to add a host.
- Edit textbox to update endpoint.
- Visit endpoint to see result.
Detailed Guide
- More complete guide here.
Why is it useful?
A few use cases:
Secure origin
It is nearly impossible to do web development without a server. Many browser APIs fail when a site is opened via a local file system.
This allows you to serve any number of local directories sites without installing a server. Since this is served on a secure origin, these have access to most of the browser APIs[^1].
[^1]: Because this relies on service workers, service workers are not available; but all other browser APIS should work.
Testing Cloud Functions
This service allows one to test cloud functions without the need to run a server locally. It aims to be compatible with worker environments.
Limitations
- While custom endpoints are saved, static directores must be re-loaded after refresh and cannot be saved. This is due to limitations of the current window.showDirectoryPicker API
- This is only accessible from inside the browser. External tools like curl, wget and insomnia are unavailable.
Trouble Shooting
It is possible to get the application into a weird state and it stops working properly.
If this should happen, save the cluster's data using the [] button and try the following in the given order:
-
First, try []. This will reload all open nodes in the cluster.
-
If that does not work, try []. This will clear all saved data and reload all open nodes in the cluster. Use the [] button to load the saved data.
-
If that does not work, try []. This will clear all saved data and close all open nodes in the cluster (except the currently focused node, which whill be reloaded). Use [] to load the saved data. Re-open nodes manually.
-
If nothing else works:
- Close all other tabs for the current site.
- Open the developer tools on the site
- Navigate to Application tab
- Navigate to he Storage sub-tab
- Click "Clear site data"
- With the developer tools still open,
- right-click the browser's reload button (⟳)
- select "Empty Cache and hard reload"
Comparison to Serevefolder.dev
This is a fork of servefolder.dev, so comparisons are welcome.
| Feature | ServeFolder.dev | Actually Serverless |
|---|---|---|
| Static Directories | ✓ | ✓ |
| HTTP Endpoints | 𐄂 | ✓ |
| Browser Compatibility | All Major Browsers | Chromium Browsers (including mobile) |
| Host/Tab Topology | ✓ | ✓ |
| Save Function on Refresh | n/a | ✓ |
| Save Folder on Refresh | Additional Step Required | 𐄂 |
| Export/Import | 𐄂 | ✓ |