One approach would be to construct a simple RESTful web service in ASP that can be invoked by TiddlyWiki from the browser. Besides writing the service handler on the ASP side, you’d also need to write some TiddlyWiki code to invoke it. This could be done with either the standalone HTML file configuration, or running TiddlyWiki under Node.js.
The other approach would be to run the Node.js configuration and access the database directly from the server side JavaScript.
Of course, if you’re already exposing the search engine via HTTP as HTML, the simplest approach would be to embed it in an iframe element.
Can you expand a little on the structure of the database and the functionality that you envisage?
Best wishes
Jeremy