https://github.com/shadesandgrays/loginpage
A bare simple login page
https://github.com/shadesandgrays/loginpage
diesel-rs good-first-issue goodfirstissue login-page rocket-rs
Last synced: about 2 months ago
JSON representation
A bare simple login page
- Host: GitHub
- URL: https://github.com/shadesandgrays/loginpage
- Owner: ShadesAndGrays
- License: apache-2.0
- Created: 2024-03-20T21:09:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-21T00:38:14.000Z (over 2 years ago)
- Last Synced: 2025-08-12T13:56:52.140Z (11 months ago)
- Topics: diesel-rs, good-first-issue, goodfirstissue, login-page, rocket-rs
- Language: Rust
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Login Page
Welcome to my login page :)
It was made using html, css and js for the front end and Rust using Rocket for the backend. The Database was mysql and the ORM was diesel and simple migrations managed by diesel cli.

# Usage
### Frontend
simply open the index.html file in the browser
### Backend
Open a new terminal and run the command
``` cargo run ```
This will start the server by default at port 8000
### Database
Diesel was used to run the database migrations. ```Diesel setup``` to set up the entire database
Alternatively, To setup the database manually.Open the msyql shell and and run the following
```mysql
CREATE DATABASE testLoginDB;
```
```mysql
USE testLoginDB;
```
```mysql
CREATE TABLE user (
name VARCHAR(45) not null,
password VARCHAR(45) not null,
PRIMARY KEY(name)
);
```
This creates a new database called **testLoginDB**. After creates a table called **user** with columns *username* and *password*
## Dependences
#### Rust Crates
- diesel 2.1.5
- dotenv 0.15.0
- rocket 0.5.0
- rocket_cors 0.6.0