Skip to content

DarcyJason/AxumBackend

Repository files navigation

Axum Backend

English | 简体中文

Features

Preparations

To run this project, you will need:

  • Rust installed on your machine.
  • Docker installed on your machine.
  • mise installed on your machine.

Installation

1. Clone the repository

git clone https://github.com/DarcyJason/AxumBackend

2. Start SurrealDB server on docker

docker run --name surrealdb \
  -p 10086:8000 \
  -v ~/surrealdb:/data \
  -d surrealdb/surrealdb:v2.4.0 \
  start \
  --user root \
  --pass root \
  rocksdb:/data/mydatabase.db

3. Start Redis server on docker

docker run --name redis \
  -p 6379:6379 \
  -v ~/redis:/data \
  -d redis:8.4.0

4. Start RustFS server on docker

docker run -d \
  --name rustfs \
  -p 9000:9000 \
  -p 9001:9001 \
  -v ~/rustfs/data:/data \
  rustfs/rustfs:1.0.0-alpha.70

5. Install surrealdb-migrations by mise

mise run prepare

6. Install tools in mise.toml by mise

mise install

7. Apply migrations to your SurrealDB

mise run migration

8. Configure .env

cp .env.example .env
  • replace SYSTEM_OWNER_NAME to your name
  • replace SYSTEM_OWNER_EMAIL to your email
  • replace SYSTEM_OWNER_PASSWORD to your password
  • replace JWT_SECRET to your jwt secret
  • replace FROM_EMAIL to your email
  • replace RESEND_API_KEY to your resend api key

9. Start the server

mise run backend

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published