Vuk Nikolić
Vuk Nikolić

Reputation: 97

Start mongodb with grails?

I'm working on a grails app application that uses mongodb.

Before starting grails, I start mongod process. But to be honest, I'm a bit lazy, and I want to start mongo when grails is starting without going to terminal (I'm starting grails from intellij).

Is there a way to add it to grails startup?

Upvotes: 0

Views: 219

Answers (1)

practical programmer
practical programmer

Reputation: 1648

It should be enough to execute OS command in Bootstrap. For example call Runtime.getRuntime().exec('/path/to/mongo/mongod')

Upvotes: 1

Related Questions