https://github.com/yammmt/last-date
ToDo based on last date I did
https://github.com/yammmt/last-date
bulma diesel rocket rust tera todo
Last synced: 5 months ago
JSON representation
ToDo based on last date I did
- Host: GitHub
- URL: https://github.com/yammmt/last-date
- Owner: yammmt
- License: mit
- Created: 2020-04-20T07:53:31.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-12-14T03:47:44.000Z (6 months ago)
- Last Synced: 2025-12-16T03:55:52.109Z (6 months ago)
- Topics: bulma, diesel, rocket, rust, tera, todo
- Language: Rust
- Homepage:
- Size: 1.76 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# last-date

Simple ToDo list based on last date I did.


## Purpose
This app's purpose is to remind **me** of forgotten daily tasks like cleaning in specific places (window, shoe case, bed cover, ...).
## Run
First, we have to install `sqlite3`.
```bash
git clone https://github.com/yammmt/last-date.git
cd last-date
cargo run
```
You can access your site by accessing `http://localhost:8000`.
### Production environment
If you want to run this in production environment, for example, run following commands.
```bash
export ROCKET_SECRET_KEY=
cargo run --release
```
You can access your site by accessing `http://:8000`.
Note that you can generate secret key with `openssl rand -base64 32`.
### For developer
#### Database
To use [Diesel](https://github.com/diesel-rs/diesel) from command line, diesel-cli is needed.
```bash
cargo install diesel_cli --no-default-features --features sqlite
export DATABASE_URL=db/mydb.sqlite # if needed
```
To use database file different from one defined in `Rocket.toml`, set environment variable.
```bash
export ROCKET_DATABASES='{sqlite_database={url="db/mydb.sqlite"}}'
```
Note that this setting is common between `cargo run` and `cargo test`.
#### CSS
This repository uses the CSS framework [Bulma](https://bulma.io/) and Sass.
The procedure to generate css files is the following:
1. Clone submodule repository by `git submodule update --init --recursive`.
1. Move to `static` directory.
1. Update `static/mystyles.scss` file.
1. Generate `static/css/mystyles.css` file by `sass --no-source-map mystyles.scss:css/mystyles.css --style compressed`.
#### Formatter
Use clippy for code lint.
```bash
cargo clippy
```
If you want to work with DB directly, you can use SQLite3 (`sqlite3 db/dev.sqlite`).
```sql
sqlite> INSERT INTO tasks(name,description,updated_at) VALUES ("Eat sushi","Essential to my life!","2020-04-20");
sqlite> SELECT * FROM tasks;
110|Eat sushi|Essential to my life!|2020-04-20
```
## Links
- [Rocket todo example](https://github.com/SergioBenitez/Rocket/tree/master/examples/todo)
- This app is based on this example :bow:
- CSS framework [Bulma](https://bulma.io/)