Hacker Newsnew | past | comments | ask | show | jobs | submit | pomdtr's commentslogin

I built a project to add a terminal emulator to the browser (using a chrome extension): https://github.com/pomdtr/tweety.

I'm working on a `tweety edit` command which open arbitrary files in your $EDITOR of choice in a new tab.


Looks great, I'll give it a try!


I personally use eget for this usecase. Might be worth a look: https://github.com/zyedidia/eget


I'm a big fan of pico.sh (it's one of my main inspiration for smallweb.run).

I'm sure you're aware of it, but it might be interesting to others: caddy exposes all of it's internal as library you can easily integrate to your projects: https://github.com/caddyserver/certmagic


This looks fantastic, I'll make sure to try it!

I've been working on a similar platform (https://smallweb.run), which allows me to host all my side projects from a single root folder. Each subfolder automatically becomes a subdomain, and I can just use vscode remote ssh or mutagen to live edit my websites.


> and I can just use vscode remote ssh or mutagen to live edit my websites

What is old is new again :) Back when I started development, we did this via git remotes, and some projects even did what you created and created environments mapped from git remotes to apps running with subdomains (like Dokku is probably the first/most memorable FOSS service for this back in the day).

And before that, I'm sure people were doing the same thing with Java WARs or similar, and before that, something else but similar.


Yeah dokku is an inspiration!

The main difference is that smallweb use deno instead of docker for sandboxing apps, and leverages url imports (which can be used to distribute complex apps like VS Code):

```

import { VSCode } from "jsr:@smallweb/vscode@0.1.7"

const vscode = new VSCode({ rootDir: Deno.env.get("SMALLWEB_DIR") });

export default vscode;

```

You can play with a live instance of smallweb at https://demo.smallweb.live


By "VSCode" here you mean something like a HTTP API for file read/write[0] that can be used from VSCode, I think? VSCode also can be made into a web app[1], but I don't see that happening here.

[0]: https://github.com/pomdtr/smallweb-vscode/blob/main/extensio...

[1]: https://github.com/gitpod-io/openvscode-server https://github.com/coder/code-server etc


By vscode I mean vscode-web + an fsprovider extension.

You can play with it at https://vscode.demo.smallweb.live (the code is located in the `vscode` folder)


> The main difference is that smallweb use deno instead of docker for sandboxing apps

Yeah, a single-runtime (smallweb) instead of any language (dokku) + I'd probably say the avoidance of using git for the delivery would be the two biggest differences I can glance.


Yeah, I see smallweb as a playground.

I want to "develop in prod", not rely on successives git pushes to see changes.

If I need semantic releases, I publish the dev version as a package on jsr, and I then import it from the "prod" app.

I still uses github as way to store my apps though, you can find them at https://github.smallweb.run


Very cool, very similar to SSHFS support on https://pico.sh/pgs and https://pico.sh/tuns


I love pico.sh! Some of their service can be reimplemented as smallweb apps.

Ex: prose.sh is similar to https://jsr.io/@tayzendev/smallblog, an app created by a member of the smallweb community (we have a server at https://discord.smallweb.run). You can see it running from smallweb at https://blog.tayzen.dev

I even use the underlying lib ssh implementation of pico.sh in smallweb (https://github.com/picosh/pobj), and I plan to introduce a cloud service similar to their (you can subscribe to the waitlist at https://cloud.smallweb.run)


`live edit my websites`

This will only work if your websites are in vanilla javascript / html right ?


Smallweb also allows you to run server-side code using deno. The main process watch for changes in the app directories, and automatically restart the corresponding deno processes when a change is detected.

If you ever interacted with cloudflare workers or https://val.town, it is a similar experience.

Feel free to join our discord at https://discord.smallweb.run if you're curious !


Interesting, thanks for sharing. Will explore


If you want to get notified on future updates, you should join the community discord at https://discord.smallweb.run


Neat! I'm working on a self-hostable platform to host my deno apps (https://smallweb.run), I wonder if I would be able to your framework on there.


Hi! Kudos for the work on SmallWeb. I actually attempted to run this on your platform as well. I was able to run it partially on Cloudflare workers, so I trust it's compatible with environments like SmallWeb as well. Let's see!


Smallweb is inspired both by serverless platforms (e.g. cloudflare workers and val.town), and older standards like cgi-bin. To create a new app, you just create a new file, and you're basically done.

Try out the demo at https://demo.smallweb.live

Smallweb is super easy to self-host (you can even keep it local to your device). It is distributed as a single golang binary, and there is an install script allowing you to set it up on a new VPS with a single command (https work out of the box, no need to set DNS records):

curl -sSL https://install.smallweb.run/vps.sh | sh

Since the app is based on deno, it supports url imports. It allows you to host complex apps like vscode or excalidraw by writing 3 lines of code: https://www.smallweb.run/examples#excalidraw

We also have a small community at https://discord.smallweb.run !


I would prefer an api base on codeblocks meta string and json attributes.

```sh name="build" deps=["install"]

npm run build

```

This would be displayed just fine in github, as it is valid gfm.


RunMe[1] seems like it is what you're looking for: https://docs.runme.dev/usage/run-tag

1: https://github.com/stateful/runme#runme-runs-markdown-- (Apache 2, golang)

I wondered why Runme wasn't already mentioned but it seems the comment got nested under a dead thread https://news.ycombinator.com/item?id=41955834


I had similar thoughts, and built myself a little framework for this: https://www.smallweb.run

The key feature it adds compared to your own setup is mapping subfolders to subdomains (+ dynamic websites, but you don't seem interested in that).

ex: ~/smallweb/example => https://example.localhost

We have a little discord community at https://discord.smallweb.run if anyone is interested.


It looks like you just reinvented CGI/PHP.


Yeah you guessed it, smallweb is basically CGI meets Deno sandboxing + https imports.


Another alternative is the "Search Menu Items" command from raycast: https://www.raycast.com/changelog/1-20-0


Why do you need Raycast for this, isn't there a built-in shortcut Cmd+? or something?


`cmd+?` works, but it's visually quite hard to follow. The raycast version looks much more like an universal command palette, and supports fuzzy matching.

You can also pin menu items for each apps.


I found a way to embed a full-stack app (@vite_js frontend + @honojs backend) as a single JSR import.

Here is a demo of @excalidraw running from @ValDotTown: https://val.town/v/pomdtr/excalidraw

I feel like this could become a lightweight alternative to docker for self-hosting.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: