1.0.3 • Published 8 years ago

rethinky v1.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

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);