提交 fbf4653f 编写于 作者: D dingbo

test: node example

上级 26487998
const { options, connect } = require("td2.0-rest-connector");
import { options, connect } from "@tdengine/rest";
async function test() {
options.url = process.env.TDENGINE_CLOUD_URL;
......@@ -6,7 +6,7 @@ async function test() {
let conn = connect(options);
let cursor = conn.cursor();
try {
let res = await cursor.query("select server_version()");
let res = await cursor.query("show databases()");
res.toString();
} catch (err) {
console.log(err);
......
......@@ -11,8 +11,6 @@ url = os.environ["TDENGINE_CLOUD_URL"]
token = os.environ["TDENGINE_CLOUD_TOKEN"]
conn = taosrest.connect(url=url, token=token)
# test the connection by getting version info
print("server version:", conn.server_info)
# ANCHOR_END: connect
# ANCHOR: insert
# create super table
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册