Skip to content

Instantly share code, notes, and snippets.

@sgnl

sgnl/zsh.md Secret

Created October 5, 2015 22:06
Show Gist options
  • Save sgnl/6e1fac7f698953e9df59 to your computer and use it in GitHub Desktop.
Save sgnl/6e1fac7f698953e9df59 to your computer and use it in GitHub Desktop.
Alias for MongoDB starting and stopping server

open your ZSH RC file subl ~/.zshrc

add this to the end of the file

# load mongodb daemon
alias mongodb-start="launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist"

#unload mongodb daemon
alias mongodb-stop="launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist"

save and then run the command: source ~/.zshrc to load your changed file.

Now you can start and stop the daemon with the aliases mongodb-start and mongodb-stop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment