Skip to content

Instantly share code, notes, and snippets.

@EdnilsonRobert
Created July 3, 2018 23:02
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 EdnilsonRobert/0c6aff676865a76f8e3e41e8c700bcce to your computer and use it in GitHub Desktop.
Save EdnilsonRobert/0c6aff676865a76f8e3e41e8c700bcce to your computer and use it in GitHub Desktop.
HTTP Server: a command-line http server

HTTP Server

# Instalar globalmente o pacote http-server
npm i -g http-server

# Iniciar o servidor local
http-server -a localhost -p 8080 -c-1 -o -S
# -a: endereço para acesso
# -p: porta de uso
# -c: cache (-1 desabilita o cache)
# -o: abrir o navegador assim que o servidor é iniciado
# -S: habilitar HTTPS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment