Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.02 KB

File metadata and controls

33 lines (22 loc) · 1.02 KB

@accounts/mongo

MongoDB adaptor for accounts

npm Circle CI Coverage Status MIT License

Note

This package is under active development.

Install

yarn add @accounts/mongo

Usage

import AccountsServer from '@accounts/server';
import MongoDBInterface from '@accounts/mongo';

// If you are using mongoose
mongoose.connect(process.env.MONGO_URL);
const db = mongoose.connection;

// If you are using mongodb
const db =  await mongodb.MongoClient.connect(process.env.MONGO_URL);

AccountsServer.config({
}, new MongoDBInterface(db));

The users will be saved under the users collection.