The project is generated by LoopBack.
npm install loopback-connector-mongodb --save
lb datasource
lb model campground , reservation
Campground can have zero or more reservations hasMany realtion with reservation
lb relation
we are allowing three types of User
- Anonymous : who can access all campgrounds API's
- Customer : Who can registered then they can make reservation ans they can see there own reservation
- Administration : Who can see anything and do anything.
lb model customer
lb relation
lb acl
? Select the model to apply the ACL entry to: (all existing models)
? Select the ACL scope: All methods and properties
? Select the access type: All (match all types)
? Select the role All users
? Select the permission to apply Explicitly deny access
lb acl
? Select the model to apply the ACL entry to: campground
? Select the ACL scope: All methods and properties
? Select the access type: Read
? Select the role All users
? Select the permission to apply Explicitly grant access
lb acl
? Select the model to apply the ACL entry to: customer
? Select the ACL scope: All methods and properties
? Select the access type: All (match all types)
? Select the role The user owning the object
? Select the permission to apply Explicitly grant access
lb acl
? Select the model to apply the ACL entry to: (all existing models)
? Select the ACL scope: All methods and properties
? Select the access type: All (match all types)
? Select the role other
? Enter the role name: admin
? Select the permission to apply Explicitly grant access
Email connector : Create Datasource and configured the SMTP and add one entry in model config
mongoexport --host=localhost --port=27017 --db=reservationDB --collection=campground --out=campground.json