Home Manual Reference Source Test Repository
import Server from 'reptar/lib/server/server.js'
public class | source

Server

Constructor Summary

Public Constructor
public

constructor(reptar: *)

Member Summary

Public Members
public

reptar: *

public

routeHandler(request: Object, reply: Object): Promise: *

Our default route handler for every request.

public

server: *

Method Summary

Public Methods
public

Create file system watchers to update Reptar state according to when a user updates files.

public

getFile(requestPath: string): File | CollectionPage

Get File/CollectionPage based on request.path.

public

async start(): Promise

Starts the Hapi server.

Public Constructors

public constructor(reptar: *) source

Params:

NameTypeAttributeDescription
reptar *

Public Members

public reptar: * source

public routeHandler(request: Object, reply: Object): Promise: * source

Our default route handler for every request.

Return:

Promise

public server: * source

Public Methods

public createFsWatchers() source

Create file system watchers to update Reptar state according to when a user updates files.

public getFile(requestPath: string): File | CollectionPage source

Get File/CollectionPage based on request.path.

Params:

NameTypeAttributeDescription
requestPath string

Request path to server.

Return:

File | CollectionPage

public async start(): Promise source

Starts the Hapi server.

Return:

Promise