Express example

1. install express and ssr

npm i express tossr

2. Create server.js

const express = require('express')
const app = express()

const PORT = 5000
const TEMPLATE = 'dist/__app.html'

// serve assets, if they exist

// otherwise serve Routify
app.get('*', async (req, res) => {
  res.sendFile(TEMPLATE, { root: __dirname })

// start server
console.log('serving on port', PORT)

3. Run server

node server

Writing good documentation that is up-to-date is difficult. If you notice a mistake, help us out.