Skip to content

Instantly share code, notes, and snippets.

@xsqian
Last active July 13, 2018 15:40
Show Gist options
  • Save xsqian/ddcf7099a63e96aab55e4257b766ddc8 to your computer and use it in GitHub Desktop.
Save xsqian/ddcf7099a63e96aab55e4257b766ddc8 to your computer and use it in GitHub Desktop.
host = db.serverStatus().host;
prompt = function() {
return db+"@"+host+"$ ";
}
or to get the uptime and total number of documents
prompt = function() {
return "Uptime:"+db.serverStatus().uptime+" Documents:"+db.stats().objects+" > ";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment