Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dioxus.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# HTML title tag content
title = "南哪另一课表"

base_path="schedule2/"

# include `assets` in web platform
[web.resource]
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@

### 安装服务端

注意:由于dioxus暂不支持运行时修改`base_path`,_配置文件的`site_url`必须和`Dioxus.toml`同步修改,修改后需要**重新编译**_。
目前,`Dioxus.toml`中的`base_path`被设为`schedule2`。
注意:由于dioxus对于在子目录下host网站的支持不好,本项目现不支持在子目录中搭建。

也就是说,可以放在`https://a.domain.com/`,不能放在`https://a.domain.com/sub_dir`。

1. 可以直接运行nix flake:

Expand Down Expand Up @@ -84,7 +85,7 @@ db_path="./cookies.sqlite"
# The URL this site is hosted
# No trailing slash
# Must start with https://
site_url="https://example.com/sub_dir"
site_url="https://example.com"
```
</details>

Expand Down
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use anyhow::Result;
use tracing::Level;

#[cfg(feature = "web")]
use nju_schedule_ics::gui;
Expand All @@ -7,6 +8,8 @@ use nju_schedule_ics::gui;
use nju_schedule_ics::server::main as server;

fn main() -> Result<()> {
dioxus_logger::init(Level::INFO).expect("Failed to init logger");

#[cfg(feature = "server")]
server::server_start()?;

Expand Down
1 change: 0 additions & 1 deletion src/server/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use tower_http::compression::CompressionLayer;
use tracing::{Level, debug, info};

pub fn server_start() -> Result<()> {
dioxus_logger::init(Level::INFO).expect("Failed to init logger");
info!("Current server working dir: {:?}", std::env::current_dir());
info!(
"Listening on: {:?}",
Expand Down
Loading