relysjs
raw JSON → 1.21.76 verified Fri May 01 auth: no javascript
relysjs is a reactive web app server focused on multi-page applications (MPAs). Current stable version is 1.21.76. It integrates Bun, Elysia, ESBuild, rmemo, and ctx-core to provide a simple server route and browser build API. Release cadence is frequent with regular updates. Differentiators include native Bun support, reactive server-side rendering, and a unified server + build pipeline with ESBuild. It simplifies MPA development by combining routing, bundling, and reactivity in a single coherent framework.
Common errors
error Error: Cannot find module 'esbuild' ↓
cause esbuild is not installed as a peer dependency.
fix
Install esbuild: bun add esbuild
error TypeError: relysjs is not a function ↓
cause Using incorrect import form (commonjs require).
fix
Use ESM import: import relysjs from 'relysjs'
error Error: 'buildLib' is not exported from 'relysjs' ↓
cause Importing from the wrong path.
fix
Import from 'relysjs/server' instead.
Warnings
breaking Drop support for Node.js < 20; requires Bun runtime. ↓
fix Use Bun v1.0+ as your JavaScript runtime.
deprecated The `serve` property is deprecated; use `routes` instead. ↓
fix Replace `serve` with `routes` in config.
gotcha All imports must be ESM; require() will throw. ↓
fix Use import syntax or set type: module in package.json.
Install
npm install relysjs yarn add relysjs pnpm add relysjs Imports
- relysjs wrong
const relysjs = require('relysjs')correctimport relysjs from 'relysjs' - Route wrong
import Route from 'relysjs'correctimport { Route } from 'relysjs' - buildLib wrong
import { buildLib } from 'relysjs'correctimport { buildLib } from 'relysjs/server'
Quickstart
import relysjs from 'relysjs';
export default relysjs({
routes: [
{
path: '/',
handler: async () => {
return `<html><body><h1>Hello, relysjs!</h1></body></html>`;
}
}
],
build: {
entryPoints: ['./client.js'],
outdir: './public'
}
});
// Run with: bun run relysjs.config.ts