diff --git a/README.md b/README.md index 54b80ed1..e361f9cd 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ class User extends Model { Db db = new Db('mongodb://localhost:27017/local'); await db.open(); -app.use('/api/users', new MongoTypedService()); +app.use('/api/users', new MongoTypedService(db.collection("users"))); app.service('api/users').afterCreated.listen((HookedServiceEvent event) { print("New user: ${event.result}");