https://github.com/tomitrescak/apollo-module-authentication
Authentication module for Apollo
https://github.com/tomitrescak/apollo-module-authentication
Last synced: 2 months ago
JSON representation
Authentication module for Apollo
- Host: GitHub
- URL: https://github.com/tomitrescak/apollo-module-authentication
- Owner: tomitrescak
- Created: 2016-09-16T02:33:53.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-07T06:48:59.000Z (about 7 years ago)
- Last Synced: 2025-02-07T19:35:03.248Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 116 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction
Connector for mongodb for apollo.
It also includes the base model for all context models.This module is built in ES6 with no transpilation for easier debugging.
You have to use Node 6+ to use it.```js
import { MongoConnector } from 'apollo-connector-mongodb');const mongoURL = 'mongodb://localshot:27017/test';
const conn = new MongoConnector(mongoURL, () => {
//init express and apollo
const context = initContext(conn);
const config = {
schema,
pretty : true,
context
};// launches a new express instance
startExpress(config);
});
```### Model
```js
class User extends BaseModel {
method() {
this.collection.find() ... // mogodb collection
}
}
```