Skip to content

Instantly share code, notes, and snippets.

@antruongnguyen
Created June 22, 2021 16:38
Show Gist options
  • Save antruongnguyen/ed783c150726ef0fad6013cdedf46ca5 to your computer and use it in GitHub Desktop.
Save antruongnguyen/ed783c150726ef0fad6013cdedf46ca5 to your computer and use it in GitHub Desktop.
Create Simple HTTP Server on localhost using NodeJS, Python, or Docker

Create Simple HTTP Server on localhost

Use NodeJS

Use Python

  • Usage with Python v3 sudo python3 -m http.server 80 (need sudo for port 80 only)

Use Docker

  • Usage docker run --name nginx -v /your/local/path/to/mount:/usr/share/nginx/html:ro -p 80:80 -d nginx
  • There are so many ways to do construct a local HTTP server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment