A fast, low memory, transactional, index & query enabled NoSQL database server for node.js that easily syncs with browser and node.js clients and servers
Let's say we already have a node http server instance running. It would be nice to be able to attach acebase to that server and specify a route it will use. For example it might look like this:
import { AceBaseServer } from "acebase-server";
import { createServer } from "http";
const server = createServer();
server.listen(8080);
/* Our own server logic... */
new AceBaseServer("mydb", { server, prefix: "/acebase" });
// Attach acebase at http://localhost:8080/acebase
If there are workarounds currently that allow to attach AceBase to an existing server, please let me know. I know that there is a .app that lets you access the express app underneath, but in my use case the server is created before the AceBase is initialized, so I cannot use its http instance... Therefore, .extend also doesn't work for me...
One more thing is that new AceBaseServer automatically starts listening which is not ideal. I think it would make sense that if you pass the server param, the said server will control when it will start to listen (as well as its port).
Let's say we already have a node
http
server instance running. It would be nice to be able to attachacebase
to that server and specify a route it will use. For example it might look like this:If there are workarounds currently that allow to attach
AceBase
to an existing server, please let me know. I know that there is a.app
that lets you access the express app underneath, but in my use case the server is created before the AceBase is initialized, so I cannot use itshttp
instance... Therefore,.extend
also doesn't work for me...One more thing is that
new AceBaseServer
automatically starts listening which is not ideal. I think it would make sense that if you pass theserver
param, the saidserver
will control when it will start to listen (as well as its port).