npm.io
1.0.3 • Published 10 years ago

rethinky

Licence
ISC
Version
1.0.3
Deps
0
Vulns
0
Weekly
0

rethinky

You have error from rethinkdb that look like this [ Uncaught ReqlDriverError: Could not connect ] how to fix this error? easy yo need to start the server first in your app, rethinky will help you to start it.

Rethinky work for window only :(

Functions

  • server.start(directory,callback);
  • server.stop();
  • server.isRunning(callback(boolean));

Example

var server = require('rethinky').server();
/*
* define where you put the rethinkdb.exe folder
*/
var directory = "C:/rethinkdb/";

server.start(directory,function(err){
    if(err !== null){
        console.log(err);
    }else{
        /* start your app here */
        app.init(); // it's just a example
    }
});
/* check if rethinkdb.exe is running */
setInterval(function(){
    server.isRunning(function(err, running){
        if(!err) console.log(running);
    });
},3000);

Keywords