Comment App Backend
It provides basic activities such as add, update, delete on comments and replies; stores them into SQLite database.
Goals
- To learn Rust language.
- To make a re-usable module / app / library.
- 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
- Clone or download this app.
- Edit Settings.toml file to update names of database folder, log folder, ip address, ...
- Build an executable file using $cargo build --release.
- 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
- Edit comment_app_backend.service for folder names; follow instructions in it, to run this app as a service in linux.
- 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