13 lines
348 B
JavaScript
13 lines
348 B
JavaScript
//A cursor also needs to be initialized in order to interact with TDengine from Node.js.
|
|
const taos = require("@tdengine/client");
|
|
var conn = taos.connect({
|
|
host: "127.0.0.1",
|
|
user: "root",
|
|
password: "taosdata",
|
|
config: "/etc/taos",
|
|
port: 0,
|
|
});
|
|
var cursor = conn.cursor(); // Initializing a new cursor
|
|
|
|
//Close a connection
|
|
conn.close(); |