Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@skroutz/ssr

Package Overview
Dependencies
Maintainers
5
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@skroutz/ssr

React ssr service

Source
npmnpm
Version
0.0.4
Version published
Weekly downloads
2
-86.67%
Maintainers
5
Weekly downloads
 
Created
Source

MVP Server Side Rendering

Experiments for server-side rendering. Namely, the current implementation uses node's worker threads module.

Worker threads are using v8 isolates under the hood, node spawns each worker in different OS threads. This is shared-nothing architecture, and communication is handled via message passing (postMessage()).

Using different worker threads is particullary useful in SSR, where the work is CPU-bound. One can spawn 1 worke per CPU and scale the load to all cores.

There is some message passing and copying large string/buffers around with this setup, we'd have to see the perf impact in practice.

Getting Started

$ nodejs ./ssr-server.mjs
$ curl http://localhost:3030
<div data-hypernova-key="SSRTest" data-hypernova-id="5bdca17e-ecb1-4f2a-afef-af298ac7dc0d"><div data-reactroot=""><p>React-rendered</p></div></div>
<script type="application/json" data-hypernova-key="SSRTest" data-hypernova-id="5bdca17e-ecb1-4f2a-afef-af298ac7dc0d"><!--e30=--></script>

FAQs

Package last updated on 23 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts