Skip to content

Conversation

@martiliones
Copy link
Collaborator

@martiliones martiliones commented Jan 3, 2023

Since the creation of the api instance is delegated in a file separate from the initialization, it is good to have a setStartupCallback that can be called from the init.js file that imports api.js

// index.js
const api = require('./api.js')

api.setStartupCallback(() => console.log('API is ready to use!'))

@martiliones martiliones merged commit 2daeabe into dev Jan 4, 2023
@adamant-al adamant-al deleted the feat/set-startup-callback branch January 8, 2023 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants