From b0dad17b92a6f55c8b4f5717a18401f25f13ab8b Mon Sep 17 00:00:00 2001 From: dianhsu Date: Thu, 28 Dec 2023 21:20:11 +0000 Subject: [PATCH] update --- .devcontainer/devcontainer.json | 32 ++++++++++++++++++++++++++++++++ .gitattributes | 1 + .gitignore | 4 +++- src/main.rs | 1 + 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .gitattributes diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..69aa3e3 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,32 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/rust +{ + "name": "Rust", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "rust", + "customizations": { + "vscode": { + "extensions": [ + "rust-lang.rust-analyzer" + ] + } + } + // Use 'mounts' to make the cargo cache persistent in a Docker Volume. + // "mounts": [ + // { + // "source": "devcontainer-cargo-cache-${devcontainerId}", + // "target": "/usr/local/cargo", + // "type": "volume" + // } + // ] + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "rustc --version", + // Configure tool-specific properties. + // "customizations": {}, + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..a52bd18 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.* text eol=lf \ No newline at end of file diff --git a/.gitignore b/.gitignore index c7989d1..8a04a48 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ templates/ AtCoder*/ Codeforces*/ -.env \ No newline at end of file +.env +AcWing/ +Luogu/ \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index d248c25..6f17c6e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -80,6 +80,7 @@ fn process(request: &str, workspace: &str, templates: &Vec, open_by_vsco } fn main() { dotenv().ok(); + println!("Server started."); let port = env::var("PORT").unwrap_or_else(|_| "27121".to_string()); let workspace = match env::var("WORKSPACE") { Ok(workspace) => workspace,