Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sardinecan/localhost
Several solutions for running a local HTTP server
https://github.com/sardinecan/localhost
Last synced: about 2 months ago
JSON representation
Several solutions for running a local HTTP server
- Host: GitHub
- URL: https://github.com/sardinecan/localhost
- Owner: sardinecan
- Created: 2023-12-31T21:31:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-18T19:27:58.000Z (9 months ago)
- Last Synced: 2024-04-18T20:40:44.791Z (9 months ago)
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
title: 'Localhost'
date: '2023-12-31'
author: 'jmorvan'
keywords: 'python ; julia ; localhost'
---Several light solutions for running a local HTTP server.
## Python
```bash
python -V
# or
python3 -V
```### Python 2
```bash
cd /path/to/directory
python -m SimpleHTTPServer
```### Python 3
```bash
python3 -m http.server --directory /path/to/directory
```## Julia
First you need to install `LiveServer`. Just enter following command int the the repl:
```julia
pkg> add LiveServer
```### Repl
```julia
julia> using LiveServer
julia> serve(host="0.0.0.0", port=8001, dir=".")
```### Terminal
```bash
julia -e 'using LiveServer; serve(host="0.0.0.0", port=8001, dir=".")'
```
### NB
see also HTTP.jl package
- [Starting a small local web server with HTTP.jl?](https://discourse.julialang.org/t/starting-a-small-local-web-server-with-http-jl/11668)
- [HTTP.jl Repo](https://github.com/JuliaWeb/HTTP.jl)## PHP
voir [documentation](https://www.php.net/manual/en/features.commandline.webserver.php)## NodeJS
## Lectures complémentaires
- https://attacomsian.com/blog/local-web-server
- https://gist.github.com/jgravois/5e73b56fa7756fd00b89
- https://medium.com/@mh_sattarian/how-to-run-a-local-server-and-more-c76dbc58d1b5
- https://tannerdolby.com/writing/build-a-minimal-http-server-with-node/
- https://runjs.app/blog/how-to-start-a-node-server