Server
Summary
Defines an HTTP Server. This Class must not be used directly, instead use one of the sub classes.
Constructor
Server
Syntax
Server
(
-
configuration
Summary
Parameters:
-
configuration
ObjectService configuration
Item Index
Properties
Methods
async
Syntax
async
(
-
callback
Summary
Handles plugins loaded event.
It assures that all plugins are fully loaded.
Parameters:
-
callback
FunctionFunction to call when its done with:
- Error An error if something went wrong
onDatabaseAvailable
Syntax
onDatabaseAvailable
(
async
-
db
-
callback
Summary
Handles database available event.
It assures that the database is loaded and can be accessed.
Parameters:
-
db
DatabaseThe application database
-
callback
FunctionFunction to call when its done with:
- Error An error if something went wrong
onPluginLoaded
Syntax
onPluginLoaded
(
async
-
plugin
-
callback
Summary
Handles plugin loaded event.
It assures that the given plugin is fully loaded.
Parameters:
Example:
MyServer.prototype.onPluginLoaded(plugin){
console.log(plugin);
};
startServer
Syntax
startServer
(
async
-
callback
Summary
Starts the server.
Parameters:
-
callback
FunctionFunction to call when it's done with :
- Error An error if something went wrong, null otherwise
Properties
httpServer
Syntax
httpServer
Application
final
Summary
Express application.