npm.io
2.0.4 • Published 7 years ago

@injectable/server-side-rendering-service

Licence
MIT
Version
2.0.4
Deps
0
Size
22 kB
Vulns
0
Weekly
0

Server Side Rendering Service

Service for hosting javascript websites with server side rendering.

This package works with the Injectable Core.

Compileable

An compileable represents any data or function as a value and a string of code to compile with webpack.
Additionally it saves all the additional files that got splitted and imports for using css. An dynamic compileable is just a observable that emits an compileable.

Functions

Registers an id for a page.

public registerPageId(): number

Sets a page to be compiled and then hosted on the baseRoute.

public setPage<Params, Page>(
    injectableName: string,
    pageId: number,
    compileableFrontendRenderer: Compileable<FrontendRenderer<Page>>,
    backendRenderer: BackendRenderer<Page>,
    compileablePageFactory: Compileable<PageFactory<Params, Page>>,
    onFileRequest: OnRequest,
    onPageRequest: OnPageRequest<Params>,
    configuration: Configuration,
    baseRoute: string,
    encodings: Array<Encoding>
): void

Deletes a page with all its files by its id.

public deletePage(injectableName: string, pageId: number): void

License

See the LICENSE file for license rights and limitations (MIT).