Skip to content
This repository was archived by the owner on Feb 10, 2022. It is now read-only.

Commit f0505d8

Browse files
author
vdemedes
committed
added Travis CI
1 parent 508c3ad commit f0505d8

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
node_js:
3+
- 0.11
4+
services:
5+
- mongodb

Readme.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Awesome ES6 generator-based MongoDB ODM for Node.js v0.11.x (or newer).
44
Just take a look on its pretty models and beautiful API.
55
Uses [monk](https://github.com/Automattic/monk) under the hood.
66

7-
![NPM stats](https://nodei.co/npm/mongorito.png?downloads=true)
7+
![Build status](https://img.shields.io/travis/vdemedes/mongorito.svg)
88

99
## Features
1010

@@ -26,7 +26,8 @@ npm install mongorito --save
2626
node --harmony something.js
2727
```
2828

29-
**Note**: In order for the following examples to work, you need use something like [co](https://github.com/tj/co).
29+
**Note**: In order for the following examples to work, you need use something like [co](https://github.com/tj/co) to run generators.
30+
**Another note**: If you want to use ES6 classes (like in the following examples), use [6to5](https://github.com/6to5/6to5). If not, there is an alternative API left from previous versions of Mongorito.
3031

3132
## Overview
3233

@@ -39,9 +40,9 @@ Mongorito.connect('localhost/blog');
3940

4041

4142
// define model
42-
var Post = Model.extend({
43-
collection: 'posts'
44-
});
43+
class Post extends Model {
44+
get collection () { return 'posts'; }
45+
}
4546

4647

4748
// create new Post document

0 commit comments

Comments
 (0)