diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e0e65a3 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,24 @@ +#[macro_use] +extern crate diesel; +extern crate dotenv; + +mod views; +mod models; +mod schema; +mod db; +mod validator; + +use actix_web::{App, HttpServer}; + +#[actix_web::main] +async fn main() -> std::io::Result<()> { + HttpServer::new(|| { + App::new() + .service(views::hello) + .service(views::echo) + .service(views::get_posts) + }) + .bind("127.0.0.1:8080")? + .run() + .await +} |