1- # codecraft-server
1+ # Backend API and services for StackClass
22
3- CodeCraft Backend Server
4-
5- [ ![ License] ( https://img.shields.io/github/license/wangeguo/codecraft-server )] ( https://github.com/wangeguo/codecraft-server/blob/master/LICENSE )
6- [ ![ GitHub contributors] ( https://img.shields.io/github/contributors/wangeguo/codecraft-server )] ( https://github.com/wangeguo/codecraft-server/graphs/contributors )
7- [ ![ GitHub issues] ( https://img.shields.io/github/issues/wangeguo/codecraft-server )] ( https://github.com/wangeguo/codecraft-server/issues )
3+ [ ![ License] ( https://img.shields.io/github/license/stackclass/backend )] ( https://github.com/stackclass/backend/blob/master/LICENSE )
4+ [ ![ GitHub contributors] ( https://img.shields.io/github/contributors/stackclass/backend )] ( https://github.com/stackclass/backend/graphs/contributors )
5+ [ ![ GitHub issues] ( https://img.shields.io/github/issues/stackclass/backend )] ( https://github.com/stackclass/backend/issues )
86
97## Installation
108
119Prebuilt binaries Windows, Linux and macOS can be downloaded from the
12- [ Github release page] ( https://github.com/wangeguo/codecraft-server /releases/latest ) .
10+ [ Github release page] ( https://github.com/stackclass/backend /releases/latest ) .
1311If there is no distro package available in your preferred manager,
1412you need [ Rust and cargo] ( https://www.rust-lang.org/tools/install ) to build it.
1513
1614### Install from source:
1715
18- 1 . Clone the repository with ` git clone https://github.com/wangeguo/codecraft-server .git `
19- 2 . From the ` codecraft -server` directory, run ` cargo build --release ` to
16+ 1 . Clone the repository with ` git clone https://github.com/stackclass/backend .git `
17+ 2 . From the ` stackclass -server` directory, run ` cargo build --release ` to
2018 build the application in release mode.
21193 . After a successful compilation, launch the executable with:
22- ` target/release/codecraft -server ` .
20+ ` target/release/stackclass -server ` .
2321
2422### Install with cargo
2523
@@ -28,7 +26,7 @@ version from git. However, this is not fully tested. That means you're probably
2826going to have more bugs despite having the latest bug fixes.
2927
3028```
31- cargo install --git https://github.com/wangeguo/codecraft-server
29+ cargo install --git https://github.com/stackclass/backend
3230```
3331
3432This will download the source from the main branch, build and install it in
@@ -37,14 +35,25 @@ Cargo's global binary directory (`~/.cargo/bin/` by default).
3735## Usage
3836
3937``` text
40- Usage: codecraft -server [OPTIONS] --repo-dir <REPO_DIR> --cache-dir <CACHE_DIR>
38+ Usage: stackclass -server [OPTIONS] --repo-dir <REPO_DIR> --cache-dir <CACHE_DIR> --database-url <DATABASE_URL> --git-server-endpoint <GIT_SERVER_ENDPOINT >
4139
4240Options:
43- --port <PORT> The Server port [env: PORT] [default: 8080]
44- --repo-dir <REPO_DIR> The path to git repositories [env: REPO_DIR]
45- --cache-dir <CACHE_DIR> Base directory for storing cached repositories [env: CACHE_DIR]
46- --github-token <GITHUB_TOKEN> A personal token to use for authentication [env: GITHUB_TOKEN]
47- -h, --help Print help
41+ --port <PORT>
42+ The Server port [env: PORT=8080] [default: 8080]
43+ --repo-dir <REPO_DIR>
44+ The path to git repositories [env: REPO_DIR=/tmp/stackclass/repos/]
45+ --cache-dir <CACHE_DIR>
46+ Base directory for storing cached repositories [env: CACHE_DIR=/tmp/stackclass/caches]
47+ --github-token <GITHUB_TOKEN>
48+ A personal token to use for authentication [env: GITHUB_TOKEN=]
49+ --database-url <DATABASE_URL>
50+ Database connection URL [env: DATABASE_URL=postgresql://stackclass:123456@localhost/stackclass]
51+ --allowed-origin <ALLOWED_ORIGIN>
52+ Allowed CORS origin [env: ALLOWED_ORIGIN=*]
53+ --git-server-endpoint <GIT_SERVER_ENDPOINT>
54+ Git server endpoint [env: GIT_SERVER_ENDPOINT=http://localhost:8080/git]
55+ -h, --help
56+ Print help
4857```
4958
5059## Development
@@ -57,7 +66,7 @@ To build this project, you will need to install the following pre-requisites:
5766Clone the Repository
5867
5968``` bash
60- git clone --recurse-submodules https://github.com/wangeguo/codecraft-server .git
69+ git clone --recurse-submodules https://github.com/stackclass/backend .git
6170```
6271
6372* (If you’ve already cloned the repository without submodules, run ` git submodule update --init --recursive ` to initialize them.)*
@@ -75,7 +84,7 @@ submitting pull requests to the project.
7584
7685## License
7786
78- Copyright (c) wangeguo . All rights reserved.
87+ Copyright (c) The StackClass Authors . All rights reserved.
7988
8089Licensed under the Apache License, Version 2.0 (the "License");
8190you may not use this file except in compliance with the License.
0 commit comments