Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

lemoncloud-engine-js

Package Overview
Dependencies
115
Maintainers
2
Versions
66
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lemoncloud-engine-js

lemoncloud.io - core engine module with user/group/chat service.


Version published
Weekly downloads
3
increased by50%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

lemoncloud-engine-js

Common LEMON Engine Module by lemoncloud.

Usage

# install module
$ npm install lemoncloud-engine-js --save

# update module
$ npm update lemoncloud-engine-js --save

사용법.

코드에서 사용 방법.

//! define instance scope.
const $scope = 0 ? global : {
	name : 'LEMON-MESSAGES'                         // name of scope
	,env : process.env								// environment setting (see below)
}

//! load engine with configuration.
const handler = require('lemoncloud-engine-js')($scope);

//! instance manager in scope of $scope
const _$ = handler._$;

//! common user handler.
const user = handler.user;
const group = handler.group;
const chat = handler.chat;

// data properties.
const FIELDS = [
    'id', 'type', 'parent', 'name', 'message'
];
const ES_FIELDS = FIELDS;

//! create engine for Messages.
const $LEM = _$.LEM(_$, '_'+name, {
    ID_TYPE     : 'LemonMessagesSeq',			// WARN! '#' means no auto-generated id.
    ID_NEXT     : 1000,                         // ID Starts
    FIELDS      : FIELDS,                       // Properties
    DYNA_TABLE  : 'Messages',                   // DynamoDB Table
    REDIS_PKEY  : 'CMMS',                       // REDIS PKEY
    ES_INDEX    : 'messages-v1',				// ES Index Name
    ES_TYPE     : 'messages',					// ES Type Name
    ES_FIELDS   : ES_FIELDS,
    NS_NAME     : name,                         // Notify Service Name. (null means no notifications)
    ES_MASTER	: 1,							// MASTER NODE.
    CLONEABLE   : true,                         // 복제 가능하며, parent/cloned 필드를 지원함.
    PARENT_IMUT : false,						// parent-id 변경 가능함(2018.03.15)
});    // load core-service with parameters.
if (!$LEM) throw new Error(NS+'$LEM is required!');

환경변수(env)

$scope.env 에는 아래와 같이 backbone 의 엔드포인트 주소가 필요. (자세한 내용은 lemoncloud-backbone-js참고)

  # MySQL backbone api
  MS_ENDPOINT:  'http://localhost:8081/mysql'
  # DynamoDB backbone api
  DS_ENDPOINT:  'http://localhost:8081/dynamo'
  # ElasticSearch backbone api
  ES_ENDPOINT:  'http://localhost:8081/elastic'
  # Redis backbone api
  RS_ENDPOINT:  'http://localhost:8081/redis'
  # SQS backbone api
  SS_ENDPOINT:  'http://localhost:8081/sqs'
  # Web backbone api
  WS_ENDPOINT:  'http://localhost:8081/web'

VERSION INFO

VersionDescription
0.2.12try to create node in dynamo if error of "an attribute that does not exist in the item"
0.2.5web-proxy as 'WS'
0.2.4record event handler
0.2.3sqs-proxy as 'SS'
0.2.0support scope during initialize

Keywords

FAQs

Last updated on 24 Apr 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc