Basic Database

This commit is contained in:
Jai A
2020-05-14 22:53:22 -07:00
parent c29ab25dd2
commit fee34ba257
23 changed files with 459 additions and 155 deletions

12
src/routes/index.rs Normal file
View File

@@ -0,0 +1,12 @@
use actix_web::{web, web::Data, App, HttpRequest, HttpResponse, HttpServer, Responder, get, post};
use handlebars::*;
#[get("/")]
pub async fn index_get(hb: web::Data<Handlebars<'_>>) -> HttpResponse {
let data = json!({
"name": "Handlebars"
});
let body = hb.render("index", &data).unwrap();
HttpResponse::Ok().body(body)
}