ApplicationOptions

ApplicationOptions

ApplicationOptions class describes the startup options of a MOST Web Framework application.

Constructor

new ApplicationOptions()

Properties:
Name Type Description
port number The HTTP binding port number. The default value is either PORT environment variable or 3000.
bind string The HTTP binding ip address or hostname. The default value is either IP environment variable or 127.0.0.1.
cluster number | string A number which represents the number of clustered applications. The default value is zero (no clustering). If cluster is 'auto' then the number of clustered applications depends on hardware capabilities (number of CPUs).
Source:
Examples
//load module
 var web = require("most-web");
 //start server
 web.current.start({ port:80, bind:"0.0.0.0",cluster:'auto' });
 
//Environment variables already set: IP=198.51.100.0 PORT=80
 var web = require("most-web");
 web.current.start();