October 2019
Intermediate to advanced
444 pages
10h 37m
English
Create templated web pages in just a few steps:
#[macro_use]extern crate actix_web;use actix_web::{middleware, web, App, HttpServer, Responder};use chrono::prelude::*;use std::env;use yarte::Template;const PLACEHOLDER_IMG: &str = "iVBORw0KGgoAAAANS[...]s1NR+4AAAAASUVORK5CYII=";#[derive(Template)]#[template(path = "index.hbs")]struct IndexViewModel { user: String, bookmarks: Vec<BookmarkViewModel>,}#[derive(Debug, Clone)]struct BookmarkViewModel { timestamp: Date<Utc>, url: String, ...