Alex's Slip-box

These are my org-mode notes in sort of Zettelkasten style

Zero config HTTP servers

:ID: 0FB30792-CC20-4653-BEC4-F5B47A434CD6

# Why?

For local testing where I need to server a directory.

See also

# Need to expose locally running server to internet?

Use a tunnel like ngrok. For example, if running a server on localhost:8080

ngrok http 8080

With a persistent domain:

ngrok http --domain= 3000

See also for alternatives

# ⭐ http-server

This has an option to enable CORS.

http-server -p 3000 --cors

# SimpleHTTPServer

This depends on having python installed. It truly is simple and doesn’t have an option for CORS for example

python -m SimpleHTTPServer 
# or depending on your python version
python3 -m http.server

# emacs-web-server

This uses httpd (apache) under the hood

(httpd-serve-directory) from the current buffer to serve its directory on port 8080

# Parcel

This is an NPM package.

This will serve on localhost:1234 by default. It supports hot reloading without configuration.

npx parcel index.html

# FTP server

Search Results