NimpleHTTPServer
SimpleHTTPServer module based on net sockets
Summary
| Latest Version | Unknown |
|---|---|
| License | HYDRA |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-22 05:28 |
Tags
Installation
nimble install NimpleHTTPServer
choosenim install NimpleHTTPServer
git clone https://github.com/Hydra820/NimpleHTTPServer
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| NimpleHTTPServer | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/Hydra820/NimpleHTTPServer |
|---|---|
| Homepage | https://github.com/Hydra820/NimpleHTTPServer |
| Registry Source | nimble_official |
README
NimpleHTTPServer
SimpleHTTPServer module for Nim - For Files Only
Install
nimble install NimpleHTTPServer
Usage
import NimpleHTTPServer
Examples
Start and stop server as you like:
import NimpleHTTPServer
# Init server with port 8080. Didn't set timeout means the server will run forever
let server = newHttpServer(8080)
server.start() # Start the server as a thread
# Do what you want
# You can check server status
echo server.status # prints true if running
server.stop() # Stop the server and close the socket
Set timeout to the server:
import NimpleHTTPServer
# Init server with timeout of 3 seconds
let server = newHttpServer(8080, 3)
server.start() # Start the server as a thread
# Do what you want
# After 3 seconds...
# Server stopped automatically
Join the server thread:
import NimpleHTTPServer
let server = newHttpServer(8080, 3)
server.start() # Start the server as a thread
# Do what you want
server.join() # Stop current thread and wait for the server
Compile
Compile only with:
--threads:on --opt:speed