Skip to content

Commit

Permalink
feat: configure adonisgoose
Browse files Browse the repository at this point in the history
  • Loading branch information
duardoqueiroz committed Jan 2, 2022
1 parent c70c3cf commit 54f1a82
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ PG_PORT=5432
PG_USER=lucid
PG_PASSWORD=
PG_DB_NAME=lucid
MONGODB_URL=localhost:27017
25 changes: 25 additions & 0 deletions ace-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,31 @@
"description": "Actions to implement"
}
]
},
"make:schema": {
"settings": {},
"commandPath": "adonisgoose/build/commands/MakeSchema",
"commandName": "make:schema",
"description": "Create a Schema from mongoose database by manuel gostosinha gameplays",
"args": [
{
"type": "string",
"propertyName": "name",
"name": "name",
"required": true,
"description": "Name of the mongoose schema"
}
],
"aliases": [],
"flags": [
{
"name": "controller",
"propertyName": "controller",
"type": "boolean",
"alias": "c",
"description": "Generate the controller for the model"
}
]
}
},
"aliases": {}
Expand Down
13 changes: 13 additions & 0 deletions config/mongo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Env from '@ioc:Adonis/Core/Env'
import Mongo from '@ioc:CuC/AdonisGoose'

interface MongoConfig {
url: string
config?: Mongo.ConnectOptions
}

const mongoConfig: MongoConfig = {
url: Env.get('MONGODB_URL'),
}

export default mongoConfig
1 change: 1 addition & 0 deletions env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ export default Env.rules({
PG_DB_NAME: Env.schema.string(),
GOOGLE_CLIENT_ID: Env.schema.string(),
GOOGLE_CLIENT_SECRET: Env.schema.string(),
MONGODB_URL: Env.schema.string(),
})

0 comments on commit 54f1a82

Please sign in to comment.