-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
idearough idea for a new featurerough idea for a new feature
Description
Currently, if one wants to hook into a lifecylce function, e.g. server:update, one needs to pass a plugin object to the SocketDB initializing function.
SocketDBServer({
plugins: [{
name: 'my-plugin',
hooks: {
'server:update': () => {
console.log('update')
}
}
}]
})This could be made easier to use by adding a intercept function:
server.intercept('server:update', () => {
console.log('update');
});Or on, but this might be misleading, as you might get the impression of this being a websocket event
server.on('server:update', () => {
console.log('update');
});It does the same thing, but just makes it a bit easier to use.
Metadata
Metadata
Assignees
Labels
idearough idea for a new featurerough idea for a new feature