OpenVeo Core server

API Docs for: 7.0.0
Show:

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 Object

    Service configuration

Methods

async

Syntax

async

(
  • callback
)

Summary

Handles plugins loaded event.

It assures that all plugins are fully loaded.

Parameters:

  • callback Function

    Function to call when its done with:

    • Error An error if something went wrong

onDatabaseAvailable

Syntax

onDatabaseAvailable

(
  • db
  • callback
)
async

Summary

Handles database available event.

It assures that the database is loaded and can be accessed.

Parameters:

  • db Database

    The application database

  • callback Function

    Function to call when its done with:

    • Error An error if something went wrong

onPluginLoaded

Syntax

onPluginLoaded

(
  • plugin
  • callback
)
async

Summary

Handles plugin loaded event.

It assures that the given plugin is fully loaded.

Parameters:

  • plugin Object

    The openveo plugin

  • callback Function

    Function to call when its done with:

    • Error An error if something went wrong

Example:

MyServer.prototype.onPluginLoaded(plugin){
  console.log(plugin);
};

startServer

Syntax

startServer

(
  • callback
)
async

Summary

Starts the server.

Parameters:

  • callback Function

    Function to call when it's done with :

    • Error An error if something went wrong, null otherwise

Properties

configuration

Syntax

configuration

Object final

Summary

Server configuration object.

httpServer

Syntax

httpServer

Application final

Summary

Express application.