Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
e76c36ab9f | |||
11db47b005 | |||
f4b4d6a02d |
3 changed files with 6 additions and 5 deletions
|
@ -20,6 +20,8 @@ If you are deploying to production, you can provide a directory path in the firs
|
|||
|
||||
Only `.svg` files will be read from that directory. The server's default port is `7878`, although this can be configured with the `PORT` environment variable.
|
||||
|
||||
It is recommended to place a reverse proxy in front of luciders to provide caching support, response compression and other optimisations that are out of scope for this project.
|
||||
|
||||
# Docker
|
||||
You can build and run this project with Docker. The Dockerfile is configured to use the submodule for the icons. To build the image:
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
use crate::{
|
||||
http::{
|
||||
error, http::{
|
||||
requests::{Request, RequestStatus, Url},
|
||||
responses::{Body, Response, UnitOrBoxedError},
|
||||
},
|
||||
threads::ThreadPool,
|
||||
}, threads::ThreadPool
|
||||
};
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
|
@ -65,7 +64,7 @@ impl Handlers {
|
|||
RequestStatus::Ok(req) => req,
|
||||
RequestStatus::MalformedHTTP(stream) => {
|
||||
stream.shutdown(Shutdown::Both).unwrap_or_else(|_| {
|
||||
eprintln!("Failed to close malformed HTTP stream")
|
||||
error!("Failed to shutdown malformed HTTP stream")
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#[macro_export]
|
||||
macro_rules! error {
|
||||
($msg:expr) => {
|
||||
eprintln!("[ERROR] {}", $msg);
|
||||
eprintln!("[ERROR] {}", $msg)
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue