1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

add factory web frontend (#77)

### Description

This PR adds a web frontend for factory.
Please let me know if you think the directory names or API endpoints should be changed.
For example, I personally think there are better names than rc_factory_api, and there may be better API names than webui...

### Game

Robocraft

### Please confirm

- [x] I am the legal owner or represent the owner of all work submitted
- [x] I consent to my submission being added to this FOSS project
- [x] This PR used LLMs to generate some or all of the code changes

Reviewed-on: https://git.ngram.ca/OpenJam/rc-servers/pulls/77
Reviewed-by: NGnius <ngniusness@gmail.com>
Co-authored-by: MaxSignal <kastera58@gmail.com>
Co-committed-by: MaxSignal <kastera58@gmail.com>
This commit is contained in:
MaxSignal
2026-01-17 20:00:14 +00:00
committed by NGnius
parent f2896509ba
commit 5fd4acdf62
11 changed files with 589 additions and 4 deletions

23
rc_factory_web/src/cli.rs Normal file
View File

@@ -0,0 +1,23 @@
use clap::Parser;
#[derive(Parser, Debug, Clone)]
#[command(version, about, long_about = None)]
pub struct CliArgs {
/// TCP port on which to accept connections
#[arg(short, long, default_value_t = 8012)]
pub port: u16,
/// IP Address on which to accept connections
#[arg(long, default_value_t = {"127.0.0.1".to_string()})]
pub ip: String,
/// Assets root
#[arg(long, default_value_t = {"../assets/robocraft".to_string()})]
pub assets: String,
}
impl CliArgs {
pub fn get() -> Self {
Self::parse()
}
}