October 2019
Intermediate to advanced
444 pages
10h 37m
English
Create a Rust binary project using cargo new html-templates and make sure that port 8081 is accessible from the localhost. After creating the project directory, you'll have to create some additional folders and files. The image files inside the static directory can be any image, as long as there is a Base64-encoded version of it available as a text file. Use an online service or the Base64 binary (https://linux.die.net/man/1/base64 on Linux) to create your own (you'll have to change the names in the code accordingly) or use ours from the repository. The .hbs files will be filled (created) in this recipe:
html-templates/├── Cargo.toml├── src│ └── main.rs├── static│ ├── packtpub.com.b64│ ├── packtpub.com.png│ ├── placeholder.b64 ...
Read now
Unlock full access