resty

RestApi framework GO Lang

Before start

Download docker environment

https://github.com/VladimirYalumov/docker_pgdb_mongodb_redis
cd [path to docker-compose.yml]
docker-compose up -d

if need do this? or delete mongodb service (it needs to logging)

chmod -R 777 mongodb

Start

1. If you use my docker add this to configs

config.yml

db_host: "127.0.0.1"
db_name: "deewave"
db_user: "user"
db_password: "qwerty"
db_port: "5432"
smtp_server: "{yoursmtp server (make it empty? if you haven't smtp server)}"
email_user: "{your email on smtp server}"
email_password: "{your password for email on smtp server}"
redis_host: "127.0.0.1:6379"

tests/functional_tests/config.yml

db_host: "127.0.0.1"
db_name: "test"
db_user: "user"
db_password: "qwerty"
db_port: "5433"
smtp_server: ""
email_user: ""
email_password: ""
redis_host: "127.0.0.1:6378"

start project

go run .

Use postman collection go rest api.postman_collection.json to test api requests

Tests

Run this command

    cd tests/functional_tests
    go test -v

GitHub

View Github