This is the Node.js library that lets you connect to [TDengine](https://www.github.com/taosdata/tdengine) though
restful. This restful can help you access the TDengine from different platform.
## Install
### On Linux
### On macOs
### On Windows
## Usage
### Connection
```javascript
importtaoRestfrom''
varconnRest=taoRest({})
```
close a connection
```javascript
connRest.close()
```
query
```javascript
letdata=connRest.Query("sql")
console.log("data:"+data)
```
## Example
An example of using the NodeJS Restful connector to create a table with weather data and create and execute queries can be found [here](https://github.com/taosdata/TDengine/tree/master/tests/examples/node-rest/rest-node-example.js)
An example of using the NodeJS Restful connector to achieve the same things but without all the object wrappers that wrap around the data returned to achieve higher functionality can be found [here](https://github.com/taosdata/TDengine/tree/master/tests/examples/nodejs/node-example-raw.js)
## Contributing to TDengine
Please follow the [contribution guidelines](https://github.com/taosdata/TDengine/blob/master/CONTRIBUTING.md) to contribute to the project.
result=awaitcursor.query("drop database if exists node_rest");
result.toString()
})()
constcreateDB="create database if not exists node_rest";
constdropDB="drop database if exists node_rest";
constcreateTBL="CREATE STABLE if not exists node_rest.meters (ts timestamp, current float, voltage int, phase float) TAGS (location binary(64), groupId int)";
constdropTBL="drop table if exists node_rest.meters ";
constinsert="INSERT INTO node_rest.d1001 USING node_rest.meters TAGS (\"Beijng.Chaoyang\", 2) VALUES (now, 10.2, 219, 0.32) ";