Skip to content

An example of a complete website using actix-web for backend

Notifications You must be signed in to change notification settings

chenjiuhai/actix-web-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 Cannot retrieve latest commit at this time.

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

actix-web-example

actix-web-example is a complete website created using actix-web. It uses diesel for interacting with the database.

The following actions can be done

  • Create an account
  • Login
  • Delete an account
  • Change password
  • Logout

Installation

  1. This uses MySql (or Maria DB) so make sure that MySql (or Maria DB) is installed and running. Feel free to change the code to use any other database.
  2. Diesel is also required. To install it
cargo install diesel_cli --no-default-features --features mysql
  1. Change .env to be of the form given below (Refer .env in this repo as an example)
DATABASE_URL=mysql://username:password@localhost/actix_web_example
  1. Run the following commands
diesel setup
diesel migration run

Running the server

cargo run

Web Client

http://localhost:8000/

About

An example of a complete website using actix-web for backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 49.0%
  • HTML 46.2%
  • CSS 4.0%
  • JavaScript 0.8%