npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dooboostore/simple-boot-http-server-ssr

v1.0.16

Published

front end SPA frameworks SSR

Readme

@dooboostore/simple-boot-http-server-ssr

NPM version Build and Test License: MIT

@dooboostore/simple-boot-http-server-ssr provides a powerful Server-Side Rendering (SSR) environment by seamlessly integrating @dooboostore/simple-boot-front and @dooboostore/simple-boot-http-server.

By utilizing JSDOM, it creates a virtual DOM environment on the server, executing the same frontend code to deliver fully rendered HTML to users instantly.


🚀 Key Features

  • Seamless SSR: Render your SPA on the server without code modifications to maximize SEO and First Contentful Paint (FCP).
  • JSDOM-based Rendering: Emulate browser APIs in a Node.js environment to execute frontend components.
  • Component Pooling: Optimize resource management by pooling SSR instances to handle concurrent requests efficiently.
  • Automatic Data Hydration: Serialize server-fetched data into the HTML, preventing redundant API calls during client-side hydration.
  • Isomorphic Architecture: Maintain a single codebase for routing, services, and components shared between server and client.
  • SWC Optimization: Dedicated filters for @dooboostore/simple-web-component to automate component registration and rendering.

📦 Installation

pnpm add @dooboostore/simple-boot-http-server-ssr @dooboostore/simple-web-component jsdom

💻 Core Usage

1. Universal Bootfactory (bootfactory.ts)

Define a shared function to initialize the application on both server and client.

export default (window: Window, urlPath?: string) => {
  // Register components
  register(window, [MyComponent, MyPage]);

  const appElement = window.document.querySelector('#app');
  if (appElement?.connect) {
    const isClient = typeof window !== 'undefined' && window === globalThis.window;
    
    appElement.connect({
      rootRouter: RootRouter,
      path: urlPath ?? '/',
      window,
      // Server renders in 'direct' mode, Client hydrates in 'swap' mode
      connectMode: isClient ? 'swap' : 'direct'
    });
  }
  return appElement;
};

2. Backend Configuration (SSR Filter)

Add SSRSimpleWebComponentFilter to your server configuration to enable SSR.

const swcFilter = new SSRSimpleWebComponentFilter({
  frontDistPath: './dist-client',
  frontDistIndexFileName: 'index.html',
  registerComponents: async (window: any) => {
    // Initialize app in server-side virtual DOM
    bootfactory(window, window.location.pathname);
  }
});

const server = new SimpleBootHttpSSRServer(
  new HttpSSRServerOption({
    filters: [new ResourceFilter('./dist-client'), swcFilter]
  })
);
server.run();

🌊 Data Hydration

Automate the process of safely transferring async data from server to client.

  1. Server Side: Fetches data and embeds it as JSON within the HTML.
  2. Client Side: Detects embedded data on load and restores the initial state.
  3. Result: Provides a fast UI for users while reducing network load.

📖 Learn More

Check out the detailed guides and tutorials in the document folder.


License

MIT License