Making connections to a database

Saturday, 15 October 2016 · 2 messages · last reply 16 Oct 2016
TD
Thomas Daly15 Oct 2016 18:03 #
Hello, I'm developing an application server with node.js. When the server starts, it creates a single connection to a BaseX database, to allow subsequent user queries to the database. I notice that when I connect separately to the BaseX database with the BaseXClient command line tool, the application server connection dies with a 'broken pipe' error. Am I doing this correctly, or should the application server connect then immediately disconnect from BaseX to serve each individual user query (in the same way that PHP works with MySQL)? Thanks Thomas
CG
Christian Grün16 Oct 2016 10:20 #
Hi Thomas,
Quoted text · Thomas Daly · 3 lines
> Am I doing this correctly, or should the application server connect then > immediately disconnect from BaseX to serve each individual user query > (in the same way that PHP works with MySQL)?
In general, it should be possible to send multiple commands and queries via an open connection. As I don’t know what exactly your are doing, feel free to provide me with a minimized example. Best, Christian

⚡Generated with XQuery