Site.js tutorial (in a toot): How to make a dynamic web site

Linux & macOS:

1. wget -qO- | bash

(On macOS, curl is preinstalled so use that instead: curl -s | bash)

2. mkdir -p counter/.dynamic

3. echo 'i=0; module.exports = (request, response) => response.html(`${++i}`)' > counter/.dynamic/index.js

4. site counter

Hit https://localhost and refresh 🤓👍

Sign in to participate in the conversation
Aral’s Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!