todo_web_server

Crates.iotodo_web_server
lib.rstodo_web_server
version0.1.4
sourcesrc
created_at2020-03-09 05:57:51.402522
updated_at2020-07-02 13:56:11.956817
descriptionA Todo-web-server for learning purpose
homepagehttps://github.com/mohankumaranna/todo_web_server
repositoryhttps://github.com/mohankumaranna/todo_web_server
max_upload_size
id216757
size82,368
Mohan (mohankumaranna)

documentation

README

todo_web_server

Note: todo web server is written based on Warp's example at Todo; here, web pages are rendered to access todo data from its app-server.

It renders web pages to access/add/modify/delete todo application data; uses handlebars templates, makes use of Reqwest client framework, and runs as a web server using WARP server framework. No database activities are handled here.

dependency

A running todo_app_server is required that supports RESTFul API calls such as GET, POST, PUT, DELETE.

Goals

  1. To learn Rust, web application in particular.
  2. To fetch data from todo app server using Reqwest framework.
  3. To try out with Handlebars (as TERA was already tried out with other web app)
  4. To make use of it as template for future projects.

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/todo-web file
    b. Settings.toml file
    c. templates folder
    d. todo_web.service file
  5. Edit todo_web.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:3040 and todo_app_server running at 127.0.0.1:3030, open up a web browser and enter url as http:://127.0.0.1:3040
  7. A home page appears; click on View All Todos, to see list of Todos.
  8. First time visit to Todos, may not have a list to show. Try with Add link; it brings up Add Todo page; try to fill-in and submit; now the added todo is listed; try to edit and then try to delete. In case of any problem in 'Delete' option with Chrome browser, try with Firefox browser.

Demo

A demo application is running at the following address:
Todo-Web Demo

License

MIT

Commit count: 0

cargo fmt