Skip to content

Latest commit

 

History

History

server

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Rust 服务器

运行

Windows 环境下,打开 PowerShell 终端,执行:

$ENV:DB_HOST="数据库主机";$ENV:DB_PORT="数据库端口";$ENV:DB_PASSWORD="数据库密码";cargo run

配置

通过 Rocket.toml 文件可以修改服务器的各项参数。更多细节请参阅官方文档

$file="admin_lessons";$dir="C:\Users\Administrator\Desktop\file\yg\server\src\handlers";Set-Location $dir;New-Item $file".rs";New-Item $file".md";Get-ChildItem | Where-Object {$_.Name -ne "mod.rs"} | Split-Path -LeafBase | Join-String -FormatString "pub mod {0};`r`n" | Set-Content -Path .\mod.rs