solve

module
v0.2.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2023 License: Apache-2.0

README

Solve

GoDoc codecov Go Report Card CII Best Practices

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:

make all

Then create config file config.json with following contents:

{
  "db": {
    "driver": "sqlite",
    "options": {
      "path": "data/db.sqlite"
    }
  },
  "server": {
    "port": 4242
  },
  "invoker": {
    "workers": 1,
    "safeexec": {
      "path": "cmd/safeexec/safeexec"
    }
  },
  "security": {
    "password_salt": "qwerty123"
  },
  "storage": {
    "driver": "local",
    "options": {
      "files_dir": "data/files"
    }
  },
  "log_level": "debug"
}

Then apply database migrations:

mkdir -p data && ./cmd/solve/solve migrate --with-data

Then run server (API will be available on http://localhost:4242):

./cmd/solve/solve server

Then you can register new admin user with password qwerty123:

./cmd/solve/solve client create-user \
  --login admin \
  --password qwerty123 \
  --email admin@gmail.com \
  --add-role admin_group

Directories

Path Synopsis
cmd
internal
api
db
Package db provides implementation of generic object and event stores.
Package db provides implementation of generic object and event stores.
invoker
Package invoker represents solve implementation for running asynchronious tasks like compiling and judging solutions.
Package invoker represents solve implementation for running asynchronious tasks like compiling and judging solutions.
models
Package models contains tools for working with solve objects stored in different databases like SQLite or Postgres.
Package models contains tools for working with solve objects stored in different databases like SQLite or Postgres.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL