Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dianhsu committed Dec 28, 2023
1 parent 677b321 commit b0dad17
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.* text eol=lf
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
templates/
AtCoder*/
Codeforces*/
.env
.env
AcWing/
Luogu/
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ fn process(request: &str, workspace: &str, templates: &Vec<String>, 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,
Expand Down

0 comments on commit b0dad17

Please sign in to comment.