Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/udovin/solve
API driven competitive programming system
https://github.com/udovin/solve
api competitive-programming docker-image golang online-judge
Last synced: 3 months ago
JSON representation
API driven competitive programming system
- Host: GitHub
- URL: https://github.com/udovin/solve
- Owner: udovin
- License: apache-2.0
- Created: 2019-06-07T07:31:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T18:04:07.000Z (8 months ago)
- Last Synced: 2024-04-24T05:35:16.735Z (8 months ago)
- Topics: api, competitive-programming, docker-image, golang, online-judge
- Language: Go
- Homepage: https://solve.by
- Size: 56 MB
- Stars: 18
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT.txt
Awesome Lists containing this project
README
# Solve
[![GoDoc](https://godoc.org/github.com/udovin/solve?status.svg)](https://godoc.org/github.com/udovin/solve)
[![codecov](https://codecov.io/gh/udovin/solve/branch/master/graph/badge.svg)](https://codecov.io/gh/udovin/solve)
[![Go Report Card](https://goreportcard.com/badge/github.com/udovin/solve)](https://goreportcard.com/report/github.com/udovin/solve)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/6577/badge)](https://bestpractices.coreinfrastructure.org/projects/6577)Solve is distributed under the terms of both the MIT license and the Apache 2.0 License.
# How to start development
First of all you should build `solve` and `safeexec` binaries:
```bash
make all
```Then create config file `config.json` with following contents:
```json
{
"db": {
"driver": "sqlite",
"options": {
"path": "data/db.sqlite"
}
},
"server": {
"port": 4242
},
"invoker": {
"workers": 1,
"safeexec": {
"path": "cmd/safeexec/safeexec"
}
},
"security": {
"password_salt": "qwerty123",
"cookie_path": "/"
},
"storage": {
"driver": "local",
"options": {
"files_dir": "data/files"
}
},
"log_level": "debug"
}
```Then apply database migrations:
```bash
mkdir -p data && ./cmd/solve/solve migrate && ./cmd/solve/solve migrate-data
```Then run server (API will be available on `http://localhost:4242`):
```bash
./cmd/solve/solve server
```Then you can register new `admin` user with password `qwerty123`:
```bash
./cmd/solve/solve client create-user \
--login admin \
--password qwerty123 \
--email [email protected] \
--add-role admin_group
```