1.0.0 • Published 6 years ago
adonisjs-mongoose-provider-br v1.0.0
Install
Install with npm:
npm install adonisjs-mongoose-provider-brInstall with yarn:
yarn add adonisjs-mongoose-provider-br##Config
Make sure to register the provider inside start/app.js file.
const providers = ["adonisjs-mongoose-provider-br/MongooseProvider"];Make a config file
adonis mongoose:configAnd then your .env file
MONGOOSE_HOST=127.0.0.1
MONGOOSE_USER=root
MONGOOSE_PASSWORD=123456
MONGOOSE_PORT=27017
MONGOOSE_DATABASE=project_db
MONGOOSE_AUTH_SOURCE=admin##Make Schema You can initiate a Schema using adonis cli
adonis make:mongoose SchemaName##Import mongoose with use("Mongo/Mongoose") or with alias use("Mongoose")
1.0.0
6 years ago