Merge pull request #16066 from taosdata/test/xiaolei/TD-18196-nodejs-3.0-reference-sample-to-ci

test(docs):add nodejs 3.0 reference sample to CI
This commit is contained in:
Shengliang Guan 2022-08-12 19:57:03 +08:00 committed by GitHub
commit 4d12791c4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,42 @@
#!/bin/bash
set -e
pgrep taosd || taosd >> /dev/null 2>&1 &
pgrep taosadapter || taosadapter >> /dev/null 2>&1 &
cd ../../docs/examples/node
npm install
cd restexample;
node connect.js
cd ../nativeexample
node connect.js
taos -s "drop database if exists power"
node insert_example.js
node query_example.js
node async_query_example.js
node subscribe_demo.js
taos -s "drop topic if exists topic_name_example"
taos -s "drop database if exists power"
node param_bind_example.js
taos -s "drop database if exists power"
node multi_bind_example.js
taos -s "drop database if exists test"
node influxdb_line_example.js
taos -s "drop database if exists test"
node opentsdb_telnet_example.js
taos -s "drop database if exists test"
node opentsdb_json_example.js