Skip to content

Akuu29/todo-in-life

Repository files navigation

todo-in-life

This is todo application.
This application has the ability to get, create, update and delete todo's.
You can also manage todo's by grouping them into "short", "medium", "long", and "complete" categories.

スクリーンショット 2022-06-22 6 27 24 スクリーンショット 2022-06-21 7 37 05 スクリーンショット 2022-06-21 7 37 20 スクリーンショット 2022-06-22 6 30 33 スクリーンショット 2022-06-22 6 29 07 Image from Gyazo

The following technologies are used:

Client

  • React

Database

  • sqlx, SQL Toolkit for Rust

Server

Setup

Client

Execute the following command in the project ./client.

# Install the dependencies for React
npm install
# Bundle the JavaScript
npm run build

Backend

Environment variables

Execute the following command in the project root.

echo HOST=0.0.0.0 >> .env
echo PORT=8000 >> .env
echo DATABASE_URL=postgres://admin:admin@localhost:5432/todo-in-life >> .env

Docker

Execute the following command in the project root.

# Build the docker container
docker compose up -d
# Enter the docker container
docker exec -it todo-in-life-actix-backend-1 bash

Database

Execute the following command in the docker container root.

# Create the database
sqlx db create
# Create the schema
sqlx migrate run

Server

Execute the following command in the docker container root.

# Start the server
cargo run

If the server starts successfully, visit localhost.