I made a small website in Rust. I'm learning Rust because I want to use it to create webapplications. I'll be expanding and improving this site each time until I feel confident enough to use Rust for real.
The project can be found here:
The functions available right now are:
I'd like some feedback to improve my code/methods of doing things.
And I have a question as well. Normally in PHP I kinda write my back-end and front-end as 'one piece'. With
<?php echo htmlspecialchars("..."); ?> I can manipulate the front-end directly from my back-end.
Also, how would I implement sessions? Now when the user logs himself in I check if the password matches with the hash. in PHP I'd set a
$_SESSION variable to keep the user logged in. But how would I do that in Rust? I can set sessions using Actix's
Session::set but the front-end doesn't remember this because it's separated from the back-end.
I'd have to send some kind of request each time to check if the user has a session? Or how would I do this?