1.0.0 • Published 5 years ago

adonisjs-mongoose-provider-br v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Install

Install with npm:

npm install adonisjs-mongoose-provider-br

Install 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:config

And 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")