This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20.6
webServer.start( )

webServer.start( ) 


 

webServer.start {( settings )} -> Result 
Parameter Type   Description
settings  Object in Web server settings to set at startup
Result  Object in Status of the Web server startup

The webServer.start( ) method starts the Web server on which it is applied, using properties set in the optional settings object parameter. 

The Web server starts with default settings defined in the settings file of the database or (host database only) using the WEB SET OPTION command. However, using the settings parameter, you can define customized settings for the Web server session. For a description of the settings, see the Returned object of the WEB Server command or the Web server properties page (some properties cannot be defined in the settings object).
Customized session settings will be reset when the webServer.stop( ) method is called. 

The method returns an object describing the Web server launch status. This object can contain the following properties:

 

Property   Type Description
success   Boolean True if the Web server was correctly started, False otherwise
errors   Collection Error stack (not returned if the Web server started successfully)
  [ ].errCode Number Error code
  [ ].message Text Description of the error
  [ ].componentSignature Text Internal component signature

 

Note: If the Web server was already launched, an error is returned. 

Example  

 C_OBJECT($settings;$webServer;$result)
 $settings:=New object("HTTPPort";8080;"defaultHomepage";"myAdminHomepage.html")
 
 $webServer:=WEB Server
 $result:=$webServer.start($settings)
 If($result.success)
  //...
 End if



See also 

webServer.stop( )

 
PROPERTIES 

Product: 4D
Theme: Web Server

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v18 R3

 
ARTICLE USAGE

4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)