httpServer

export declare function httpServer(Class: Function, options: HttpOptions): Array<IModule>;

Is main function for starting application server. All modules are recursively initialized once at server startup from deepest three node to root node in case below Application module is initialized last in system except Logger and Router services thy are initalized first during application bootstrap.

You can start application server on any module declared in system!

import {Application} from "./application";
import {httpServer} from "typeix";
/**
 * Bootstraps server
 *
 * @function
 * @name httpServer
 *
 * @description
 * Creates server instance on port 9000
 * We always use separate bootstrap file to bootstrap application because of testing or server side fakeHttp feature.
 * We will be able to simulate server side request with fakeHttp
 */
httpServer(Application, { port: 9000 });

results matching ""

    No results matching ""