summaryrefslogtreecommitdiff
path: root/dichroism/src/main.rs
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-10-05 22:05:58 -0400
committerAdam T. Carpenter <atc@53hor.net>2020-10-05 22:05:58 -0400
commit743ae22168b1fcdf2e1e54bcadbb1bb3fce3370d (patch)
tree3d393ff1ffd06d1bf470430b2316f46000794806 /dichroism/src/main.rs
parentf8bf353073220ce329d8eb347e3574d5793b6d26 (diff)
downloadtheglassyladies-743ae22168b1fcdf2e1e54bcadbb1bb3fce3370d.tar.xz
theglassyladies-743ae22168b1fcdf2e1e54bcadbb1bb3fce3370d.zip
started work on schema, models, and repos
Diffstat (limited to 'dichroism/src/main.rs')
-rw-r--r--dichroism/src/main.rs35
1 files changed, 0 insertions, 35 deletions
diff --git a/dichroism/src/main.rs b/dichroism/src/main.rs
deleted file mode 100644
index 442b92d..0000000
--- a/dichroism/src/main.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-#[macro_use]
-extern crate lazy_static;
-
-use actix_web::{App, HttpServer};
-use listenfd::ListenFd;
-
-mod config;
-mod error;
-mod handlers;
-mod image_api;
-mod result;
-
-#[actix_web::main]
-async fn main() -> std::io::Result<()> {
- let mut listenfd = ListenFd::from_env();
- let mut server = HttpServer::new(|| {
- App::new()
- .service(handlers::hello)
- .service(handlers::create_image)
- .service(handlers::get_products)
- });
-
- server = if let Some(l) = listenfd
- .take_tcp_listener(0)
- .expect("Unable to grab TCP listener!")
- {
- // "Debug mode" with cargo watch auto-reloading
- server.listen(l)?
- } else {
- // "Release mode"
- server.bind("127.0.0.1:8000")?
- };
-
- server.run().await
-}