# @roxi/ssr

> JSDOM SSR renderer for Svelte

Latest version **0.2.1** (published 2020-10-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install @roxi/ssr
pnpm add @roxi/ssr
yarn add @roxi/ssr
bun add @roxi/ssr
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2020-10-01 |
| First published | 2020-09-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 40 |
| Author | jakobrosenberg@gmail.com |
| Maintainers | jakobrosenberg |
| Keywords | svelte, ssr, jsdom, router |

## Links

- npm: https://www.npmjs.com/package/@roxi/ssr
- Repository: https://github.com/sveltech/ssr
- Homepage: https://github.com/sveltech/ssr#readme
- Issues: https://github.com/sveltech/ssr/issues
- npm.io page: https://npm.io/package/@roxi/ssr

## Dependencies (4)

- [jsdom](https://npm.io/package/jsdom.md) ^16.0.1
- [bufferutil](https://npm.io/package/bufferutil.md) ^4.0.1
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0
- [utf-8-validate](https://npm.io/package/utf-8-validate.md) ^5.0.2

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 0.2.1 (latest) — 2020-10-01
- 0.2.0 — 2020-09-29
- 0.1.1 — 2020-09-29
- 0.1.0 — 2020-09-22

## README

# ssr

#### Universal SSR renderer

### Install
``npm i @sveltech/ssr``

### Usage example
```javascript
const { ssr } require('@sveltech/ssr')
const fs = require('fs')

const template = fs.readFileSync('./dist/index.html')
const script = fs.readFileSync('./dist/app.js')

ssr(template, script, '/blog/ssr-is-fun')
  .then(html => console.log(html + '<!--ssr rendered-->'))
```

### Important!

The HTML is only rendered after an ``app-loaded`` event has been emitted from the app.
```javascript
dispatchEvent(new CustomEvent('app-loaded'))
```

---

For more information, refer to the API documentation.
https://github.com/sveltech/ssr/wiki/API

---
_Source: https://npm.io/package/@roxi/ssr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
