nia.js
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

Nia

Nia.js a very simple tool for transfer MongoDB collection into Elasticsearch.

NPM Version MongoDB Elasticsearch

nia

Install

npm install nia.js

Delete Old Elastic data

curl -XDELETE localhost:9200/*

Usage

import { Nia } from 'nia.js';

Nia(opts);
const opts = {
  esOpts: {
    esHost: 'localhost',
    esPort: '9200',
    log: 'error',
    apiVersion: '7.2',
    requestTimeout: 50000,
  },
  esIdx: '{by default collection_name}',
  esType: '{by default collection_name}',
  moColl: '{collection_name}',
  moUrl: `mongodb://localhost:27017/{database_name}`,
  pQueue: 250,
};

Package Sidebar

Install

npm i nia.js

Weekly Downloads

4

Version

1.1.4

License

ISC

Unpacked Size

13.8 kB

Total Files

19

Last publish

Collaborators

  • rebiss