#comments #reqwest #handlebars #warp #client #front-end

bin+lib comment_app_frontend

A Comment App Front End Server

4 releases

0.1.3 Jul 7, 2020
0.1.2 Jul 7, 2020
0.1.1 Jun 8, 2020
0.1.0 Jun 6, 2020

#11 in #comment

MIT license

93KB
2K SLoC

Rust 1K SLoC // 0.0% comments Handlebars 514 SLoC JavaScript 360 SLoC // 0.0% comments

Comment App Frontend

It renders web pages to access/add/modify/delete comments data from/to comment_app_backend server.

Dependency

A running comment_app_backend server is required.

Goals

  1. To learn Rust; web application in particular.
  2. To use it as a commenting module/app/library in other Rust based web applications.
  3. To keep comment data along with application, and hence, to avoid third party commenting system.

How to use it

  1. Clone or download this app from github.
  2. Edit Settings.toml file to update ip address, app server's ip address, log folder name.
  3. Build an executable file using $cargo build --release
  4. Copy following files/folder into a separate folder, say "~/projects":
    a. target/release/comment-app-frontend file
    b. Settings.toml file
    c. templates folder
    d. images folder
    e. authorization_data folder
    f. comment_app_frontend.service file
  5. Edit comment_app_frontend.service for folder names and follow instructions in it, to run this app as a service in linux.
  6. Assuming an entry in Settings.toml file for ip_address as 127.0.0.1:6060 and comment_app_frontend server running at 127.0.0.1:6050, open up a web browser and enter url as http:://127.0.0.1:6060/comments. Browser shows Comments view. It confirms server is running.
    • for other possible url paths, refer functions in src/filters.rs source code file. Each function at the start is shown with url path.

Demo

Click here to view demo.

License

MIT

Dependencies

~25–40MB
~755K SLoC