pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/kachayev/nasus

GitHub - kachayev/nasus: Zero-configuration command-line async HTTP files server in Clojure. Like Python's SimpleHTTPServer but scalable.
Skip to content
/ nasus Public

Zero-configuration command-line async HTTP files server in Clojure. Like Python's SimpleHTTPServer but scalable.

License

Notifications You must be signed in to change notification settings

kachayev/nasus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nasus HTTP Server

A simple zero-configuration command-line HTTP files server. Like Python's SimpleHTTPServer but scalable. Сan easily handle thousands of simultaneous connections.

Implemented in Clojure with Aleph and Netty. Mostly as an example. It's still skillful and handy tho'. There's even nothing wrong with putting it to production.

Usage

Run in the directory you want to serve:

clj -Sdeps '{:deps {nasus {:mvn/version "0.1.7"}}}' -m http.server

Or specify custom port:

clj -Sdeps '{:deps {nasus {:mvn/version "0.1.7"}}}' -m http.server 8001

Features

  • Plain text & HTML directory listings based on "Accept" header
  • Automatic mime-type detection
  • Streaming and chunked encoding for large files
  • Keep-alive and slow requests handling
  • Transparent content compression (gzip, deflate)
  • Cache control and "Last-Modified"
  • CORS headers

In development:

  • Range queries support
  • SSL/TLS
  • List of files & directories to exclude from serving

Flags

  -p, --port <PORT>         8000        Port number
  -b, --bind <IP>           0.0.0.0     Address to bind to
      --dir <PATH>          ./          Directory to serve files
      --auth <USER[:PASSWORD]>          Basic auth
      --no-index                        Disable directory listings
      --no-cache                        Disable cache headers
      --no-compression                  Disable deflate and gzip compression
      --follow-symlink                  Enable symbolic links support
      --include-hidden                  Process hidden files as normal
      --cors                            Support Acccess-Control-* headers, see --cors-* options for more fine-grained control
      --cors-origen                     Acccess-Control-Allow-Origin response header value
      --cors-methods                    Acccess-Control-Allow-Methods response header value
      --cors-allow-headers              Acccess-Control-Allow-Headers response header value
      --index-document-path <PATH>      When requesting "dir/", respond with "dir/<PATH>" instead of a listing
  -h, --help

License

Copyright © 2020 Nasus

Nasus is licensed under the MIT license, available at MIT and also in the LICENSE file.

About

Zero-configuration command-line async HTTP files server in Clojure. Like Python's SimpleHTTPServer but scalable.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 9

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy