modify node.js tmq case

This commit is contained in:
menshibin 2024-12-14 14:24:53 +08:00
parent d1bfc48439
commit bdb96ee86d
3 changed files with 2 additions and 4 deletions

View File

@ -26,7 +26,6 @@ async function createDbAndTable() {
let conf = new taos.WSConfig(dsn);
conf.setUser('root');
conf.setPwd('taosdata');
conf.setDb('power');
wsSql = await taos.sqlConnect(conf);
console.log("Connected to " + dsn + " successfully.");
// create database

View File

@ -40,7 +40,6 @@ async function prepare() {
let conf = new taos.WSConfig('ws://localhost:6041');
conf.setUser('root');
conf.setPwd('taosdata');
conf.setDb('power');
const createDB = `CREATE DATABASE IF NOT EXISTS ${db}`;
const createStable = `CREATE STABLE IF NOT EXISTS ${db}.${stable} (ts timestamp, current float, voltage int, phase float) TAGS (location binary(64), groupId int);`;

View File

@ -34,10 +34,10 @@ async function createConsumer() {
}
async function prepare() {
let conf = new taos.WSConfig('ws://192.168.1.98:6041');
let conf = new taos.WSConfig('ws://localhost:6041');
conf.setUser('root');
conf.setPwd('taosdata');
conf.setDb('power');
const createDB = `CREATE DATABASE IF NOT EXISTS ${db}`;
const createStable = `CREATE STABLE IF NOT EXISTS ${db}.${stable} (ts timestamp, current float, voltage int, phase float) TAGS (location binary(64), groupId int);`;