Skip to content

github1337/sails-mysql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image_squidhome@2x.png

MySQLAdapter

Adds MySQL support for Sails.

Sails.js Repo

http://SailsJs.org

Installation

Install from NPM.

$ npm install sails-mysql

Sails Configuration

Add the mysql config to the config/adapters.js file. Basic options:

module.exports.adapters = {
  'default': 'mysql',

  mysql: {
    module   : 'sails-mysql',
    host     : 'localhost',
    port     : 3306,
    user     : 'username',
    password : 'password',
    database : 'MySQL Database Name'
    
    // OR (exlicit sets take precedence)
    module   : 'sails-mysql',
    url      : 'mysql2://USER:PASSWORD@HOST:PORT/DATABASENAME'
    }
  }
};

About Waterline

Waterline is a new kind of storage and retrieval engine. It provides a uniform API for accessing stuff from different kinds of databases, protocols, and 3rd party APIs. That means you write the same code to get users, whether they live in mySQL, LDAP, MongoDB, or Facebook. Waterline also comes with built-in transaction support, as well as a configurable environment setting.

githalytics.com alpha

About

MySQL adapter for Sails.js

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.6%
  • Makefile 0.4%