Donno about you guys but it sure is nice not to have to try and decipher the clusterfuck-like syntax of Hugo’s Go-based templating engine anymore…
The code on the left is Kitten¹, on the right is Hugo².
Kitten’s ‘template engine’ is just JavaScript tagged template strings.
(I’m porting the Small Technology Foundation web site³ from Site.js⁴ to Kitten, and in the process from being a Hugo-based static site to a dynamic one with a nice little admin panel I’m making to make it trivially easy to add new news items, events, and videos.)
¹ https://kitten.small-web.org
² https://gohugo.io
³ https://small-tech.org
⁴ https://sitejs.org
#Kitten #SmallWeb #SmallTech #Hugo #JavaScript #Go #web #dev #NodeJS #templating
Your web server having an interactive shell (REPL) where you can live update entries in your site/app’s database is pretty neat (if I do say so myself) :)
https://kitten.small-web.org/reference/#kitten-s-interactive-shell-repl
(I’m porting the Small Technology Foundation¹ from Site.js² – and hence from being a static site generated via Site.js’s integrated Hugo³ – to Kitten⁴. In the process, I’m creating an admin panel⁵ for the news, events, and videos sections, which will make them easier to update, and storing the data in Kitten’s internal JavaScript Database⁶.)
¹ https://small-tech.org
² https://sitejs.org
³ https://gohugo.io/
⁴ https://kitten.small-web.org
⁵ It’s trivial to create authenticated routes in Kitten. You just add a lock emoji (🔒) to the end of your route’s name. e.g., admin🔒.page.js or /admin🔒/index.page.js (see https://kitten.small-web.org/reference/#sessions-and-authentication).
⁶ https://codeberg.org/small-tech/jsdb
#Kitten #REPL #shell #JavaScript #database #JavaScriptDatabase #JSDB #SmallTechnologyFoundation #SiteJS #Hugo #web #dev #NodeJS
New Kitten¹ release
• Fixes #227²: Strips superflous <p> tags added around Kitten components used in Markdown pages³
Enjoy!
:kitten:💕
¹ https://kitten.small-web.org
² https://codeberg.org/kitten/app/issues/227
³ https://kitten.small-web.org/reference/#markdown-pages-page-md-files
#Kitten #SmallWeb #SmallTech #markdown #web #dev #JavaScript #NodeJS
@small-tech/https version 5.3.0 released
• Uses Auto Encrypt 4.1.1 (removes OCSP stapling support because Let]s Encrypt has removed OCSP support).
https://www.npmjs.com/package/@small-tech/https
This module is a drop in replacement for Node HTTPS module that automatically handles TLS certificate provisioning and renewal both at localhost (via Auto Encrypt Localhost¹) and at hostname (via Auto Encrypt²).
So, this is how you create a HTTPS server in Node.js that uses this module and automatically handles TLS certificate provisioning and renewal for you both at localhost (during development) and at hostname (during production):
```js
import https from '@small-tech/https'
const server = https.createServer((request, response) => {
response.end('Hello, world!')
})
server.listen(443, () => {
console.log(' 🎉 Server running at https://localhost.')
})
```
(Yes, that’s it! I wrote a metric shit-tonne of meticulously-tested code so you don’t have to.) :)
💡 Note that the localhost certificate support via Auto Encrypt Localhost is 100% JavaScript and does NOT rely on an external binary like mkcert or certutil.
Needless to say, Kitten³ uses this module under the hood and it’s a big part of why Domain⁴ can deploy servers so easily that don’t require any day-to-day maintenance.
In case you’re wondering why I’m spending so much time releasing all these modules, it’s because I believe in sharing every brick of the house I’m building so others can easily build different houses if they want to. I’m not saying that what I’m building with Kitten, Domain, and Place⁵ will be the end all be all of the Small Web⁶ (the peer-to-peer web). And I want others to be able to experiment by building their own tools without having to go through the grueling development process I’ve had to in the past six years to build basic infrastructure.
Enjoy!
💕
¹ https://codeberg.org/small-tech/auto-encrypt-localhost
² https://codeberg.org/small-tech/auto-encrypt
³ https://kitten.small-web.org
⁴ https://codeberg.org/domain/app
⁵ https://codeberg.org/place/app
⁶ https://ar.al/2024/06/24/small-web-computer-science-colloquium-at-university-of-groningen/
#SmallWeb #SmallTech #AutoEncrypt #LetsEncrypt #localhost #TLS #SSL #HTTPS #Kitten #NodeJS #JavaScript #servers #web #dev #FOSS
@michaelc Latter. Once Domain (https://codeberg.org/domain/app) is out and folks can set up their Small Web places easily on their own VPS servers using it and Place (https://codeberg.org/place/app) exists and is being used, I plan on looking into offering a little device you can plug into your home router.
Of course, you can do that yourself today by getting a single-board computer running a Linux distribution that uses system-d, installing Kitten via the one line installation command at https://kitten.small-web.org, and then running `kitten deploy <Git URL of kitten app you want to serve>` and you’d have your own little Small Web server device (if you’re technically-savvy but everything I’m working on is for everyday people who use technology as an everyday thing and that’s why there’s so much more I have to do to get it to that level).
May I say so myself that I‘m loving playing with Kitten¹ to build Domain² (shown below) and Place³.
¹ https://kitten.small-web.org
² https://codeberg.org/domain/app
³ https://codeberg.org/place/app
#Kitten #Domain #Place #SmallWeb #SmallTech #humanRights #democracy #technology #peerToPeerWeb
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.