Skip to content

Instantly share code, notes, and snippets.

@josketres
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josketres/45c53c2a3c50a7424bb9 to your computer and use it in GitHub Desktop.
Save josketres/45c53c2a3c50a7424bb9 to your computer and use it in GitHub Desktop.
Serve files in the current directory using 'mongoosehere' command
#!/bin/bash
# https://gist.github.com/josketres/45c53c2a3c50a7424bb9
# Install mongoose binary in your ~/bin and add 'mongoosehere' alias
# ------------------------------------------------------------------
# mongoosehere - Start an http server in your current directory
# assuming that ~/bin is added to your $PATH (in your .bashrc)
cd ~/bin
wget -O mongoose https://mongoose.googlecode.com/files/mongoose-lua-sqlite-ssl-static-x86_64-5.1
chmod +x mongoose
cat >> ~/.bashrc <<'EOF'
# mongoosehere - https://gist.github.com/josketres/45c53c2a3c50a7424bb9
alias mongoosehere='mongoose -document_root `pwd`'
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment