https://github.com/atlinx/toasttask
Todo application in Vue, TailwindCSS, Rust, and PostgreSQL 🍞
https://github.com/atlinx/toasttask
Last synced: about 1 year ago
JSON representation
Todo application in Vue, TailwindCSS, Rust, and PostgreSQL 🍞
- Host: GitHub
- URL: https://github.com/atlinx/toasttask
- Owner: Atlinx
- Created: 2023-07-13T10:15:18.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-26T02:04:40.000Z (almost 3 years ago)
- Last Synced: 2025-02-01T04:27:49.266Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 2.28 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Toast Task 🍞
Todo/task tracking webapp build in Vue with a backend in Rust using a Postgres DB.
## General
### Building
> **NOTE:**
>
> Make sure to develop in WSL, Linux, or MacOS. `cargo watch` seems to not work when running on a Windows machine,
> which makes development painfully slow because the docker container must be rebuilt every time to view new changes.
1) Make a copy of the `.env.template` file and replace items with `` with actual data.
2) Run the command:
```bash
./run_dev.sh
```
> **NOTE:**
>
> If docker gives you `error getting credentials` errors whenever
> you build on WSL, please run:
>
> ```bash
> rm ~/.docker/config.json
> ```
### Cleanup
Run the command:
```bash
docker-compose down -v
```
## Backend
### SQLX
Make sure you have `sqlx-cli v0.6.3` installed! The newer versions don't work since `rocket` depends on `sqlx v0.6`.
## Testing
Inside the `backend` folder, run one of the following commands:
```bash
./scripts/run_tests.sh
./scripts/watch_tests.sh
```
## Resources
- [Accessing Postgresql Database](https://www.cherryservers.com/blog/how-to-install-and-setup-postgresql-server-on-ubuntu-20-04)
- Logging into Postgres
```bash
sudo -u postgres psql
```
- Commands
- `\q` - Quit
- `\l` - List databases
- `\c {database}` - Connect to `{database}`
- `\dt` - Lists tables
- Configuration file is stored at
```
/etc/postgresql/12/main/postgresql.conf
```
> **NOTE:**
>
> Use an alternative port to `5432` on windows,
> because you might already have a Windows Postgres DB
> taking up that port.
> **NOTE:**
>
> Add `listen_addresses = '*'` to your `postgresql.conf`
> file to ensure you can connect from windows