For more sample code please refer to <https://docs.tdengine.com/cloud/data-in/insert-data/> and <https://docs.tdengine.com/cloud/data-out/query-data/>.
For how to write data and query data, please refer to <https://docs.tdengine.com/cloud/data-in/insert-data/> and <https://docs.tdengine.com/cloud/data-out/query-data/>.
Replace <goDSN\> with the real value, the format should be `https(<cloud_host>)/?token=<token>`.
Replace <goDSN\> with the real value, the format should be `https(<cloud_host>)/?token=<token>`.
To obtain the value of `goDSN`, please log in [TDengine Cloud](https://cloud.tdengine.com) and click "Connector" and then select "Go".
To obtain the value of `goDSN`, please log in [TDengine Cloud](https://cloud.tdengine.com) and click "Data In" on the lef menu.
:::
:::
<!-- exclude-end -->
<!-- exclude-end -->
...
@@ -78,3 +78,5 @@ Finally, test the connection:
...
@@ -78,3 +78,5 @@ Finally, test the connection:
```
```
go run main.go
go run main.go
```
```
The client connection is then established. For how to write data and query data, please refer to <https://docs.tdengine.com/cloud/data-in/insert-data/> and <https://docs.tdengine.com/cloud/data-out/query-data/>.
Then you can execute `cargo run` to test the connection.
Then you can execute `cargo run` to test the connection. For how to write data and query data, please refer to <https://docs.tdengine.com/cloud/data-in/insert-data/> and <https://docs.tdengine.com/cloud/data-out/query-data/>.
@@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
...
@@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
## Install Connector
## Install Connector
```bash
```bash
npm i td2.0-rest-connector
npm install @tdengine/rest
```
```
## Config
## Config
...
@@ -56,4 +56,6 @@ To obtain the value of cloud token and URL, please log in [TDengine Cloud](https
...
@@ -56,4 +56,6 @@ To obtain the value of cloud token and URL, please log in [TDengine Cloud](https
```javascript
```javascript
{{#includedocs/examples/node/connect.js}}
{{#includedocs/examples/node/connect.js}}
```
```
\ No newline at end of file
For how to write data and query data, please refer to <https://docs.tdengine.com/cloud/data-in/insert-data/> and <https://docs.tdengine.com/cloud/data-out/query-data/>.
The client connection is then established. For how to write data and query data, please refer to <https://docs.tdengine.com/cloud/data-in/insert-data/> and <https://docs.tdengine.com/cloud/data-out/query-data/>.