Smallweb 0.23
by Achille Lacoin
2 min read
This release was supposed to be published yesterday, but I accidentally spilled coffee on my laptop. I had to wait a full day for it to dry, but it seems to be working fine now. So here we are!
Git Integration
Your smallweb instance can now act as a git server! First, make sure that your public ssh key is in the authorizedKeys
field of your config.json
file (either globally or per app).
Then, you can specify a new remote for your git repository, and push your code to your smallweb instance. The syntax of a smallweb remote is ssh://<app>@<domain>/
. Here is an example:
$ git remote add smallweb.run ssh://[email protected]/
$ git push smallweb.run
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 214 bytes | 214.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Your app is available at https://example.smallweb.run
To ssh://smallweb.run/
* [new branch] main -> main
branch 'main' set up to track 'smallweb.run/main'.
Make sure that your repository use a main
default branch, as it is the only one supported for now.
Automatic detection of the smallweb directory
The git
influence does not stop there. From now on, there is no longer a default smallweb directory. Instead, the smallweb
cli will look for the .smallweb
directory in the current directory, and in the parent directories.
If you want to override this behavior, you can use the --dir
flag. This --dir
flag can be leveraged in aliases, for example:
alias smallweb.run='smallweb --dir ~/smallweb/smallweb.run'
Add back smallweb open
command
The last release removed the smallweb open
command, which was a mistake. It is now back, and can be used to open any app in the default browser.
Remove typescript / jsx compilation in default file server
In the previous versions of smallweb, the default file server was able to compile typescript and jsx files. I decided to remove this feature, as it was quite buggy, and prevented smallweb apps to be easily portable to other platforms.