Skip to content

A micro plugin that use rethinkdb-init to create databases, tables and indexes when your hapi server starts.

Notifications You must be signed in to change notification settings

g-div/hapi-rethinkdb-init

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hapi-rethinkdb-init

Greenkeeper badge

npm travis-status

A micro plugin that use rethinkdb-init to create databases, tables and indexes when your hapi server starts.

nodei.co

Install

npm install --save hapi-rethinkdb-init

Use

var Hapi = require('hapi');

var server = new Hapi.Server();

var options = {
	tables: [
    {
      name: 'person',
      indexes: ['firstName', 'lastName']
    },
    'address'
  ]
};

server.register(require('hapi-rethinkdb'), function (err) {
	server.register({register: require('hapi-rethinkdb-init'), options: options}, function (err) {
		// Table person with firstName and lastName indexes created
		// Table address created
	});
});

Options

Dependencies

Package Version Dev
joi ^7.0.1
rethinkdb ^2.2.0
rethinkdb-init 0.0.5
babel-cli ^6.2.0
babel-core ^6.2.1
babel-preset-es2015 ^6.1.18
code ^2.0.1
hapi ^11.1.2
hapi-rethinkdb ^2.0.1
lab ^7.3.0
node-readme ^0.1.9
rethinkdb ^2.2.0

Author

g-div

License

About

A micro plugin that use rethinkdb-init to create databases, tables and indexes when your hapi server starts.

Resources

Stars

Watchers

Forks

Packages

No packages published