Creates a new Iridium Core instance connected to the specified MongoDB instance
The config object defining the database to connect to
Creates a new Iridium Core instance connected to the specified MongoDB instance
The config object defining the database to connect to
Gets the currently active database connection for this Iridium Core.
Gets the database that this Iridium core is connected to
Gets the name of the database that this Iridium core is connected to
Gets the plugins registered with this Iridium Core
Gets the configuration specified in the construction of this Iridium Core.
Gets the URL used to connect to MongoDB
Closes the active database connection
Connects to the database server specified in the provided configuration
Provides an express middleware which can be used to set the req.db property to the current Iridium instance.
A method which is called once a database connection has been established and accepted by Iridium
In subclassed Iridium cores this method can be overridden to perform tasks whenever a connection to the database has been established - such as setting up indexes for your collections or seeding the database.
A method which is called whenever a new connection is made to the database.
The underlying MongoDB connection which was created, you can modify or replace this if you wish.
A promise for the connection, allowing you to perform any asynchronous initialization required by your application.
In subclassed Iridium Cores this method can be overridden to manipulate the properties of the underlying MongoDB connection object, such as authenticating. Until this method resolves a connection object, Iridium will be unable to execute any queries. If you wish to run Iridium queries then look at the onConnected method.
Parses the name of a DB from a URL string
The url string whose path component is the name of the DB
Registers a new plugin with this Iridium Core
The plugin to register with this Iridium Core
Generated using TypeDoc
The Iridium Core, responsible for managing the connection to the database as well as any plugins you are making use of.
Generally you will subclass this to provide your own custom core with the models you make use of within your application.