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