sails-akera

1.0.0 • Public • Published

##saild-akera saild-akera is the Sails/Waterline connector for Akera.io Application Server.

##Installation

npm install sails-akera

##Basic use

To use this connector you need and instance of akera-server running.

  1. Quick start:
  • Install sails-akera connector in your Sails.js project.
npm install sails-akera
  • Add a connection to akera.io application server inside connections.js configuration file.
	akeraSports: {
		adapter: 'sails-akera',
		host: 'localhost',
		port: 8383
	}

For information on configuring the connector in a Sails application, please refer to Sails documentation.

  • Define models to match the tables from connected databases on akera.io application server:
/**
 * Customer.js
 *
 * @description :: Customer model.
 * @docs        :: http://sailsjs.org/documentation/concepts/models-and-orm/models
 */
 
module.exports = {
	autoCreatedAt: false,
	autoUpdatedAt: false,
	attributes: {
		CustId: {
			type: 'integer',
			primaryKey: true,
			columnName: 'CustNum',
			autoIncrement: true
		},
		Name: {
			type: 'string'
		},
		city: {
			type: 'string'
		},
	}
};
  • Lift your Sails.js project.
sails lift

Package Sidebar

Install

npm i sails-akera

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • akeraio