Giter Club home page Giter Club logo

hapi-rethinkdb's Introduction

It's-a me! Jose!

  • ๐Ÿ—ฃ๏ธ My name is pronounced /xoหˆse/.
  • ๐ŸŒŽ I'm a ๐Ÿ‡ป๐Ÿ‡ช living in ๐Ÿ‡ฆ๐Ÿ‡ท.
  • ๐Ÿ‘จโ€๐Ÿ’ป Doing things with computers since I'm 7 years old.
  • ๐Ÿ‘จโ€๐Ÿ’ผ I work every day with Kubernetes, Terraform, Bash and Go. And love designing and building the simplest, cleanest systems you can ever come around. Currently doing it at @foxcorp for the Platforms Engineering team.
  • ๐Ÿ“ง I'm not very active in social networks, but you can always send me an email. It's not hard to figure it out since it's in all my commits.

hapi-rethinkdb's People

Contributors

g-div avatar ghostbar avatar henryfjordan avatar natelaws avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hapi-rethinkdb's Issues

connection error

i am using docker installation of rethink db and host and port are 1192.168.99.100 and 32799 when i pass that in opts it is not working .and showing the default one only. kindly suggest as i am new to hapi

Exposing rethinkdb instance

In the readme it has request.server.plugins['hapi-rethinkdb'].rethinkdb. However in the code it does plugin.expose('library', rethink);

Not sure which is actually wanted.

opts settings don't work

Did you try to connect to some other RethinkDB host?
Because option settings doesn't work. It always fall back to localhost.

server.register({
register: require('hapi-rethinkdb'),
opts: { url: '111.222.333.444:28015/test' }
}, function (err) {
if (err) console.error(err);
});

don't work.

Can't access the RethinkDB context set up by the Hapi plugin.

According to the documentation, The RethinkDB library and the connection are bound to the server context inside handlers on this.rethinkdb and this.rethinkdbConn.
However, I'm not being able to access those, only using request.server.plugins etc. Is it because the context set inside a plugin with server.bind() is only available inside the plugin itself ?

My code is like this:
index.js

const plugins = [{register: require('hapi-rethinkdb'), options: {url: //url here}]

server.register(plugins, () => {
    server.route(require('./routes'))
    server.start()
}) 

routes.js:

{
   method: 'GET',
   path: '/list-of-things',
   handler: function(request, reply) {

      // I have to use it like this:
      const r = request.server.plugins['hapi-rethinkdb'].rethinkdb;
      const connection = request.server.plugins['hapi-rethinkdb'].connection;

      // Because this throws undefined:
      const r = this.rethinkdb;
      const connection = this.rethinkdbConn
   }

 }

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.