Categorygithub.com/Korisss/skymp-master-api-go
module
0.0.0-20230615055217-bef6861d7a57
Repository: https://github.com/korisss/skymp-master-api-go.git
Documentation: pkg.go.dev

# README

SkyMP Master API

Red House SkyMP Master API implementation written on Go. Supports only MongoDB databases. Verification methods are not yet provided.

Build

Prerequisites

  • Go for build.
  • Docker for use local MongoDB database.

Installing dependencies

go get -d -v ./

Building app

go build -o main ./cmd/app/main.go

Run app without build

go run ./cmd/app/main.go

Configuration

App use environment variables and config file.

All environment variables:

  • MONGO_URI - string
  • PASSWORD_SALT - string
  • JWT_SECRET - string
  • PORT - uint16 (0 < port < 65535)
  • PRODUCTION - bool

Development

During development, you can use local database instance in docker via:

docker run --name mongodb -d -p 27017:27017 mongo

Tests

Run tests:

go test ./...

Mock generation

Install GoMock:

go install github.com/golang/mock/[email protected]

Generate:

mockgen -source="./internal/service/service.go" -destination="./internal/service/mocks/mock.go"

# Packages

No description provided by the author
No description provided by the author