2.6.0 • Published 5 years ago
spassr v2.6.0
Small Express server with SSR
Usage example
$ npx spassr --assets-dir dist --entrypoint dist/index.html --script dist/build/bundle.js --ssrConfiguration
Spassr can be configured through CLI, package.json, spassr.config.js and .env.
Environment variables are converted from snake_case to camelCase, so SPASSR_assets_dir = dist becomes {... assetsDir: 'dist'}
For configuration options, refer to the API below.
API
Table of Contents
spassr
Parameters
optionsPartial<config.Config> *
Config
Type: object
Properties
assetsDir(string | Array<string>) folders with static content to be served.entrypointstring HTML template, eg. assets/index.html.scriptstring path to app, eg. build/bundle.js.port(string | number) port to serve on.ssrboolean enable SSR for routes not resolved in assetsDir.silentboolean quiet console.log.middlewareFunction function to customize SPA server (Not available in CLI).ssrOptionsPartial<tossr.Config> options to pass to ssr.
Eval
Called before/after the app script is evaluated
Type: Function
Parameters
domobject The DOM object
config
Type: Config
Business vector created by teravector - www.freepik.com
2.6.0
5 years ago
2.5.0
5 years ago
2.4.1-0
5 years ago
2.3.0
5 years ago
2.4.0
5 years ago
2.3.1
5 years ago
2.2.3
5 years ago
2.2.2
5 years ago
2.2.1
5 years ago
2.2.0
5 years ago
2.2.0-0
5 years ago
2.1.6
5 years ago
2.1.5
5 years ago
2.1.4
5 years ago
2.1.3
5 years ago
2.1.2
5 years ago
2.1.1
5 years ago
2.0.0
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago