I have a rest api, should I always use it like below or I don't need to
open and close the connections on every hit? maybe the database only?
orientdb.connect();
await orient.query('insert into User content '+JSON.stringify(validUser));
orient.disconnect();
export function connect() {
server = OrientDB({
host: config.get("orientdb.host"),
port: config.get("orientdb.port"),
username: config.get("orientdb.username"),
password: config.get("orientdb.password")
});
db=server.use(config.get("orientdb.database"));
}
export function disconnect() {
db.close();
server.close();
}
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.