[GH-ISSUE #2] Access to database through AceBaseServer instance #3

Closed
opened 2026-05-23 08:37:57 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @appy-one on GitHub (Feb 19, 2021).
Original GitHub issue: https://github.com/appy-one/acebase-server/issues/2

Originally assigned to: @appy-one on GitHub.

It's currently not possible to access the database used by the AceBaseServer instance. However, this is desirable if one wants to add "cloud functions" to their database server. Right now, the only way to do this is to create a separate app that connects to the server through an AceBaseClient.

Current solution:

const db = new AceBaseClient({ ... });
await db.ready();
await db.auth.signIn('admin', 'thepassword');

// Monitor images being added by users, resize them to multiple sizes:
db.ref('uploads/images').on('child_added', async snap => {
    // Resize
});

Desired solution:

const server = new AceBaseServer(dbname, settings);
await server.ready();

// Monitor images being added by users, resize them to multiple sizes:
server.db.ref('uploads/images').on('child_added', async snap => {
    // Resize
    // NOTE: heavy tasks should be done in worker thread to keep server responsive
});
Originally created by @appy-one on GitHub (Feb 19, 2021). Original GitHub issue: https://github.com/appy-one/acebase-server/issues/2 Originally assigned to: @appy-one on GitHub. It's currently not possible to access the database used by the AceBaseServer instance. However, this is desirable if one wants to add "cloud functions" to their database server. Right now, the only way to do this is to create a separate app that connects to the server through an AceBaseClient. **Current solution:** ```js const db = new AceBaseClient({ ... }); await db.ready(); await db.auth.signIn('admin', 'thepassword'); // Monitor images being added by users, resize them to multiple sizes: db.ref('uploads/images').on('child_added', async snap => { // Resize }); ``` **Desired solution:** ```js const server = new AceBaseServer(dbname, settings); await server.ready(); // Monitor images being added by users, resize them to multiple sizes: server.db.ref('uploads/images').on('child_added', async snap => { // Resize // NOTE: heavy tasks should be done in worker thread to keep server responsive }); ```
gitea-mirror 2026-05-23 08:37:57 -06:00
Author
Owner

@appy-one commented on GitHub (Feb 19, 2021):

Implemented in v1.1.0

<!-- gh-comment-id:782176590 --> @appy-one commented on GitHub (Feb 19, 2021): Implemented in v1.1.0
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase-server#3
No description provided.