1
0
mirror of https://github.com/actix/examples synced 2025-06-29 02:10:36 +02:00

feat: Example for Sailfish template engine (#528)

Co-authored-by: aaverichev <Aleksandr.Averichev@hermesrussia.ru>
Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
averichev
2022-02-17 23:15:18 +03:00
committed by GitHub
parent d815a44ccc
commit ddb84ebf6f
10 changed files with 234 additions and 3 deletions

View File

@ -1,12 +1,16 @@
# Handlebars
This is an example of how to use Actix Web with the [Handlebars templating language](https://crates.io/crates/handlebars), which is currently the most popular crate that achieves this. After starting the server with `cargo run`, you may visit the following pages:
This is an example of how to use Actix Web with the [Handlebars](https://crates.io/crates/handlebars) templating language, which is currently the most popular crate that achieves this.
## Usage
```bash
cd template_engines/handlebars
cargo run
```
After starting the server, you may visit the following pages:
- http://localhost:8080
- http://localhost:8080/Emma/documents
- http://localhost:8080/Bob/passwords

View File

@ -9,4 +9,4 @@
<h1>{{name}} example</h1>
<p>This is an example of how to use {{name}} with Actix-Web.</p>
</body>
</html>
</html>

View File

@ -9,4 +9,4 @@
<h1>Welcome back, {{user}}</h1>
<p>Here's your {{data}}.</p>
</body>
</html>
</html>