Go to file
Nathan.fooo bb80fd5350
fix: redis connect (#2)
* fix: redis connect

* chore: add Readme and support no tls

* chore: cache docker build

* chore: update

* fix: fix postgres and redis connection

* chore: update port

* ci: lint
2023-05-05 00:00:02 +08:00
.cargo fix: redis connect (#2) 2023-05-05 00:00:02 +08:00
.github ci: fix audit 2023-03-16 21:33:11 +08:00
build fix: redis connect (#2) 2023-05-05 00:00:02 +08:00
cert fix: request fail caused by certificate issue 2023-03-15 09:32:23 +08:00
configuration fix: redis connect (#2) 2023-05-05 00:00:02 +08:00
crates ci: fix audit 2023-03-16 21:33:11 +08:00
migrations refactor: use i64 as user id 2023-03-16 11:23:42 +08:00
src fix: redis connect (#2) 2023-05-05 00:00:02 +08:00
tests/api fix: redis connect (#2) 2023-05-05 00:00:02 +08:00
.dockerignore fix: redis connect (#2) 2023-05-05 00:00:02 +08:00
.env fix: redis connect (#2) 2023-05-05 00:00:02 +08:00
.gitignore refactor: use cargo workspace 2022-02-07 15:08:49 +08:00
Cargo.lock fix: redis connect (#2) 2023-05-05 00:00:02 +08:00
Cargo.toml ci: fix audit 2023-03-16 21:33:11 +08:00
Dockerfile fix: redis connect (#2) 2023-05-05 00:00:02 +08:00
Makefile fix: redis connect (#2) 2023-05-05 00:00:02 +08:00
README.md fix: redis connect (#2) 2023-05-05 00:00:02 +08:00
docker-compose.yml fix: redis connect (#2) 2023-05-05 00:00:02 +08:00
sqlx-data.json feat: add document test 2023-03-16 21:01:36 +08:00

README.md

Pre-requisites

You'll need to install:

Here are the Os-specific requirements:

Windows

cargo install -f cargo-binutils
rustup component add llvm-tools-preview
cargo install --version="~0.6" sqlx-cli --no-default-features --features rustls,postgres

Linux

# Ubuntu 
sudo apt-get install lld clang libssl-dev postgresql-client
# Arch 
sudo pacman -S lld clang postgresql
cargo install --version="~0.6" sqlx-cli --no-default-features --features rustls,postgres

MacOS

brew install michaeleisel/zld/zld
cargo install --version="~0.6" sqlx-cli --no-default-features --features rustls,postgres

How to build

Run the init_db.sh to create a Postgres database container in Docker:

./scripts/init_db.sh

Run the init_redis.sh to create a Redis container in Docker:

./scripts/init_redis.sh

Build the project:

cargo build

or you can try to run the tests in your local machine:

cargo test