Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pomdtr/smallweb
Your Internet Folder
https://github.com/pomdtr/smallweb
Last synced: 1 day ago
JSON representation
Your Internet Folder
- Host: GitHub
- URL: https://github.com/pomdtr/smallweb
- Owner: pomdtr
- License: other
- Created: 2024-05-11T22:12:35.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T22:27:16.000Z (2 months ago)
- Last Synced: 2024-10-25T08:35:04.412Z (2 months ago)
- Language: Go
- Homepage: https://smallweb.run
- Size: 7.36 MB
- Stars: 42
- Watchers: 5
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Smallweb - Host websites from your internet folder
Smallweb is a lightweight web server based on [Deno](https://deno.com). It draws inspiration from both legacy specifications like [CGI](https://en.wikipedia.org/wiki/Common_Gateway_Interface), modern serverless platforms such as [Val Town](https://val.town) and static sites generators like [Blot.im](https://blot.im).
Smallweb maps domains to folders in your filesystem. For example, if you own the `pomdtr.me` domain:
- `https://www.pomdtr.me` maps to `~/smallweb/www`
- `https://example.pomdtr.me` maps to `~/smallweb/example`Creating a new website is as simple as creating a folder and opening the corresponding URL in your browser. There's no need to configure a build step (unless you want to) or start a development server. Since servers are mapped to folders, you can manage them using standard Unix tools like `cp`, `mv`, or `rm`.
## A self-hosted personal cloud
Each incoming HTTP request is sandboxed in a single Deno subprocess by the Smallweb evaluation server. If there are no incoming requests, no resources are used, making it an ideal solution for low-traffic websites.
Smallweb does not use Docker, but it still sandboxes your code using Deno. And if you website suddenly go viral, you can move your site to Deno Deploy in one command.
## Installation
All the instructions are available in the [docs](https://docs.smallweb.run).
## Examples
All the websites on the `smallweb.run` domain are hosted using smallweb (including this one):
-
-
-Since creating smallweb websites is so easy, you can even create super simple ones. For example, when I want to invite someone to the smallweb discord server, I just send him the link , which maps to `~/smallweb/discord/main.ts` on my vps.
```ts
export default {
fetch: () => Response.redirect("https://discord.gg/BsgQK42qZe"),
};
```