comment_app_backend

Crates.iocomment_app_backend
lib.rscomment_app_backend
version0.1.3
sourcesrc
created_at2020-06-06 15:46:08.548938
updated_at2020-07-07 10:20:29.921562
descriptionServes comments through Restful APIs
homepagehttps://github.com/mohankumaranna/comment_app_backend
repositoryhttps://github.com/mohankumaranna/comment_app_backend
max_upload_size
id250729
size173,147
Mohan (mohankumaranna)

documentation

README

Comment App Backend

It provides basic activities such as add, update, delete on comments and replies; stores them into SQLite database.

Goals

  1. To learn Rust language.
  2. To make a re-usable module / app / library.
  3. To support Anonymous users and Logged-In users
    • Anonymous users cannot modify or delete comment once submitted;
    • whereas, Logged-In users can modify or delete it.

How to use it

  1. Clone or download this app.
  2. Edit Settings.toml file to update names of database folder, log folder, ip address, ...
  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-backend file
    b. Settings.toml file
    c. images folder
    d. comment_app_backend.service file
  5. Edit comment_app_backend.service for folder names; follow instructions in it, to run this app as a service in linux.
  6. Assuming entry in Settings.toml file for ip_address as 127.0.0.1:6050, open up a web browser and enter url as http:://127.0.0.1:6050/comments. Browser shows comments in JSON format. 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.
    • this backend server can be accessed using
      a. Postman
      b. frontend server
      - for frontend server, install Comment_App_Frontend.

Demo

Click here to view demo.

License

MIT

Commit count: 0

cargo fmt