To setup my full work environment I would ideally like to:
Tab 1: Start MongoDB
Tab 2: Open the MongoDB shell (mongo)
within Tab 2 we're now inside the mongo client, waiting for input.
within Tab 2 I would now like to connect to my project's DB (use db_name) then authenticate via db.auth( 'user', 'pass' )
I could easily get step 1 and 2 accomplished but trying to then run code within Tab 2 is where I got stuck… is there any way this can be done?
Thanks for reading.
Below is my full script in case that helps which is run via consular start scst in Terminal.app (OSX 10.7)
# Setup the dev environment for the SCST project.
setup 'echo "setup"'
# CD into project directory
before { run 'cd ~/Sites/git/scst/scst' }
# Start MongoDB
tab "mongo_start" # note: this is an alias available in my system
# Connect to MongoDB shell
tab do
run "mongo" # open the mongo shell
run "use scst" # within mongo, connect to project's DB
run "db.auth('user', 'pass')" # authenticate to this DB.
end
# Start the Play framework
tab "play run"
# Start Compass compiler process
tab "compass watch"
# Open a new tab in the correct project directory.
tab "echo 'SCST Environment is ready to go...'"
To setup my full work environment I would ideally like to:
mongo
)mongo
client, waiting for input.use db_name
) then authenticate viadb.auth( 'user', 'pass' )
I could easily get step 1 and 2 accomplished but trying to then run code within Tab 2 is where I got stuck… is there any way this can be done?
Thanks for reading.
Below is my full script in case that helps which is run via
consular start scst
in Terminal.app (OSX 10.7)