UNPKG

880 BMarkdownView Raw
1# JavaScript Driver
2
3This package is the officially supported driver for querying a
4RethinkDB database from a JavaScript application. It is designed to
5be run in Node.js but also has an alternate http connection type that
6is used by the RethinkDB web ui. The http connection type is not
7intended to be used by applications, since it isn't secure.
8Ultimately, the http connection type will move into the web ui code
9and out of the driver.
10
11Check out
12[rethinkdb.com/api/javascript](http://www.rethinkdb.com/api/javascript)
13for documentation and examples of using this driver.
14
15## Creating the proto-def.js
16
17To build the JavaScript driver, you'll need to first generate the
18definitions file `proto-def.js`. To do that from the `drivers`
19directory, you can do:
20
21```bash
22$ ./convert_protofile -l javascript \
23 -i ../src/rdb_protocol/ql2.proto \
24 -o ./javascript/proto-def.js
25```