# i18next-node-mongodb-backend

> i18next node.js backend layer for i18next using mongodb

Latest version **0.0.6** (published 2017-09-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install i18next-node-mongodb-backend
pnpm add i18next-node-mongodb-backend
yarn add i18next-node-mongodb-backend
bun add i18next-node-mongodb-backend
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2017-09-26 |
| First published | 2016-02-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Gianluca Pengo |
| Maintainers | digital-rockers, gian |
| Keywords | i18next, i18next-backend, mongodb |

## Links

- npm: https://www.npmjs.com/package/i18next-node-mongodb-backend
- Repository: https://github.com/gian788/i18next-node-mongodb-backend
- Homepage: https://github.com/gian788/i18next-node-mongodb-backend#readme
- Issues: https://github.com/gian788/i18next-node-mongodb-backend/issues
- npm.io page: https://npm.io/package/i18next-node-mongodb-backend

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [@temporal-architect/claude-plugin](https://npm.io/package/@temporal-architect/claude-plugin.md) — 335 weekly downloads

## Recent versions

- 0.0.6 (latest) — 2017-09-26
- 0.0.5 — 2016-02-24
- 0.0.4 — 2016-02-20
- 0.0.3 — 2016-02-20
- 0.0.2 — 2016-02-20
- 0.0.1 — 2016-02-19

## README

# Introduction

This is a i18next backend to be used node.js. It will load resources from a [mongoDB](https://www.mongodb.org) database.

# Getting started

Source can be loaded via [npm](https://www.npmjs.com/package/i18next-node-mongodb-backend).

```
$ npm install i18next-node-mongodb-backend
```

Wiring up:

```js
var i18next = require('i18next');
var Backend = require('i18next-node-mongodb-backend');

i18next
  .use(Backend)
  .init(i18nextOptions);
```

As with all modules you can either pass the constructor function (class) to the i18next.use or a concrete instance.

## Backend Options

```js
{
  host: 'localhost',
  port: 27017,
  db: 'i18next-mongodb-test',

  // or
  uri: 'mongodb://localhost:27017/i18next-mongodb-test',

  // collection containing i18next data
  collection: 'i18next',

  // optional mongoDB connection options
  options: {}
}
```

Options can be passed in:

**preferred** - by setting options.backend in i18next.init:

```js
var i18next = require('i18next');
var Backend = require('i18next-node-mongodb-backend');

i18next
  .use(Backend)
  .init({
    backend: options
  });
```

on construction:

```js
var Backend = require('i18next-node-mongodb-backend');
var backend = new Backend(null, options);
```

by calling init:

```js
var Backend = require('i18next-node-mongodb-backend');
var backend = new Backend();
backend.init(options);
```

---
_Source: https://npm.io/package/i18next-node-mongodb-backend · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
