SkillAgentSearch skills...

Serlina

A progressive React serverside-rendering framework.

Install / Use

/learn @djyde/Serlina
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

logo npm downloads CircleCI

A progressive React serverside-rendering framework.

Motivation

I love using Next.js, but most of my projects need to use our own web server framework while Next.js run it own server. So I begin making a SSR framework (core) that like Next.js but open for server implementation. It does all the building, compiling, rendering-to-string things and give the rest render-to-html things to your own web server.

Of course I know Next.js can custom server and routing, but while Next.js handle the whole http context, I cannot use it in a high layer web framework.

Read the announcing post

Integrations

Quick Start

npm i serlina react react-dom --save

Create a folder structure like:

├── index.js
├── pages
│   └── page1.js
// pages/page1.js

export default () => {
  return <div>Hello Serlina!</div>
}

And implement a most simple http server:

// index.js

const { Serlina } = require('serlina')
const path = require('path')

const http = require('http')

const serlina = new Serlina({
  baseDir: path.resolve(__dirname, './')
})

serlina.prepare()
  .then(() => {
    http.createServer(async (req, res) => {
        res.writeHead(200, { 'Content-Type': 'text/html' })
        if (req.url === '/page1') {
          const rendered = await serlina.render('page1')
          res.write(rendered.body)
        } else {
          res.write('works!')
        }
        res.end()
    }).listen(8090)
  })
  .catch(console.error)

Open http://localhost:8090/page1, you will see the page you wrote in React!

Documentation

Visit Full Doc

Who is using?

<img src="https://ws2.sinaimg.cn/large/006tNbRwly1fxteoetaagj31kq0d8dhv.jpg" width="320" /> <img src="https://ws1.sinaimg.cn/large/006tNbRwly1fxtepijxdrj30ay05gglp.jpg" width="320" />

Please create an issue or PR to tell us you are using Serlina!

Development

npm run bootstrap

npm test # run test

License

MIT License

View on GitHub
GitHub Stars138
CategoryDevelopment
Updated7mo ago
Forks7

Languages

TypeScript

Security Score

92/100

Audited on Aug 27, 2025

No findings