npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lemon-engine

v2.2.5

Published

Lemon Engine Module to Synchronize Node over DynamoDB + ElastiCache + Elasticsearch by [lemoncloud](https://lemoncloud.io)

Downloads

94

Readme

travis codecov npm version GitHub version

lemon-engine

Automatic Node Synchronizer between DynamoDB + Redis + Elasticsearch over AWS Cloud.

  • NOTE 백엔드 서버에 lemon-backend-api 별도 실행 필요!

Overview

  • NoSQL (DynamoDB) <-> ElastiSearch <-> Redis 데이터 동기화
  • DynamoDB 업데이트시 -> 업데이트 Stream 수신 -> 변경 데이터 추적 -> ES 와 동기화.

engine

Usage (사용법)

  • install with npm npm install lemon-engine --save

  • create internal Service with data model

import engine from 'lemon-engine';

//! create engine in global scope.
const $engine = engine(global, { env: process.env });

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

//! config engines (as example)
const $model = $engine.createModel(`${name}`, {
    ID_TYPE         : '#STRING',        // WARN! '#' means no auto-generated id.
    ID_NEXT         : 0,                // ID Starts
    FIELDS          : FIELDS,           // Properties
    DYNA_TABLE      : 'LemonTable',     // DynamoDB Table
    REDIS_PKEY      : '#TDQ',           // '#' means no use redis, but elastic as cache.
    ES_INDEX        : 'lemons-v1',      // ES Index Name
    ES_TYPE         : 'none',           // ES Type Name (deprecated since ES6)
    ES_FIELDS       : ES_FIELDS,        // ES Fields List.
    NS_NAME         : name,             // Notify Service Name. (null means no notifications)
    ES_MASTER       : 1,                // ES Master NODE.
    ES_VERSION      : 6,                // ES Target Version (6 means 6.x)
    CLONEABLE       : true,             // Clonable with parent/cloned property.
    PARENT_IMUT     : false,            // Immutable of parent property (2018.03.15)
    ES_TIMESERIES   : false,            // As time-Series data, useful when saving time-series.
    XECURE_KEY      : 'lemon',          // (optional) Encryption Key (use '*' prefix at property name: ver 0.3.22)
});
  • build CRUD common service functions.
//! search by param
// ex) { id: 1234 } => search by `id == 1234`.
const do_search = (id, param) => {
    _log(NS, `do_search(${id})... param=`, $U.json(param));
    return $model.do_search(id, param);
};

Installation (설치법)

  • lemon-backend-api 백본 서비스 구성
  • configure environment.

개발 (Development)

Deploy (NPM 모듈 배포)

  1. package.jsonversion 정보를 변경
  2. $ npm run publish 실행 (단, npm 로그인 필요!)
  3. lemon-engine 으로 배포됨.

Contribution

Plz, request PR. See CODE_OF_CONDUCT

LICENSE

MIT


VERSION INFO

| Version | Description |-- |-- | 2.2.5 | improve http-request of type+id+cmd. | 2.2.4 | optimize log in init engine. | 2.2.3 | hot-fix type error of $U.dt(). | 2.2.2 | relay context as that._ctx in on_record_update(), and use common BACKBONE_API env. | 2.2.1 | hot-fix error of $protocol().do_execute(). | 2.2.0 | support enhanced type definitions. | 2.1.8 | support do_read_deep for direct reading via dynamodb. | 2.1.6 | support method PATCH in web-proxy. required backbone#2.1.4. | 2.1.5 | custom web-proxy by _$.createWebProxy(). | 2.1.4 | support relaying headers in web-proxy. required backbone#2.1.3. | 2.1.0 | refactoring to typescript. | 2.0.0 | rename to lemon-engine, and set to public.