Huxi Server is a site engine for web applications, based on Axum and PostgreSQL.
The document in English is being written, and the following is in Chinese.
Demo: https://www.huxi.fun
Huxi(呼吸) Server 是用Rust编写的网站系统,主要用于构建网站应用。
axum
maud
bootstrap
PostgreSQL
和 sqlx
www
,导入 pgsql/setup.sql
,创建表
psql www < pgsql/setup.sql
详细说明见 pgsql/README.md。
cp examples/config.toml my-config.toml
编辑 my-config.toml
,其中SMTP
设置用于用户注册。
示例:
bash
export WWW_CONFIG=/home/huxi/has/my-config.toml
export WWW_PORT=3000
export DATABASE_URL=postgres://huxi:12345678@localhost/www
cargo run
打开网址: http://localhost:3000
注册用户后,在pgsql中,修改 users.i_role = 5, 例如:
sql
update users set i_role=5 where name='admin';
见 examples/nginx.conf
川月(huxifun@sina.com)