```
python3 -m http.server
```
or if you don't want to use the default port 8000
```
python3 -m http.server 3333
```
or if you want to allow connections from localhost only
```
python3 -m http.server --bind 127.0.0.1
```
See the [docs](https://docs.python.org/3/library/http.server.html#module-http.server)
```
$ npm install -g http-server
$ http-server Downloads -a localhost -p 8080
```
Starting up http-server, serving Downloads on port: 8080
Hit CTRL-C to stop the server