Skip to content

Latest commit

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

hapi-mysql

Dead-simple MySQL plugin for Hapi. Usage:

Register plugin:

varserver=Hapi.createServer('0.0.0.0',8000);server.pack.require('hapi-mysql',Config.db,function(err){if(err){console.error(err);throwerr;}});

Use plugin:

request.server.plugins['hapi-mysql'].pool.getConnection(function(err,connection){// Use the connectionconnection.query('SELECT 1 FROM mytable',function(err,rows){if(err){thrownewError(err)}})// And done with the connection.connection.release();})

About

Dead-simple MySQL plugin for Hapi

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages