Giter Club home page Giter Club logo

practicum-gophermart's Introduction

practicum-gophermart

Installation

git clone https://github.com/v1tbrah/practicum-gophermart

Getting started

Prepairing

  • You need PostgreSQL installed. You can check it: psql --version. If it's not installed, visit https://www.postgresql.org/download/
  • You need PostgreSQL database "gophermart". If there isn't, do the following:
    sudo -u postgres psql
    CREATE DATABASE gophermart;
    

Options

The following options are set by default:

api server run address: `:8081`
accrual system run address: `:8080`
log level: `info`
order status update interval: `5s`
  • flag options:
   -a string
      api server run address
   -d string
      database connection string
   -r string
      api accrual run address
   -u duration
      order status update interval
   -l string
      log level 

For example: go run cmd/gophermart/main.go -d="host=localhost port=5432 user=postgres password=12345678 dbname=gophermart sslmode=disable"

  • env options can check in internal/parse

Note!

  • You definitely need to configure the db connection string

Starting

  • Open first terminal. Go to work project directory. Run binary "accrual loyalty" system. For example:
    cd ~/go/src/practicum-gophermart
    ./cmd/accrual/accrual_linux_amd64
    
  • Open second terminal. Go to project working directory. Run "gophermart" app. For example:
    cd ~/go/src/practicum-gophermart
    go run cmd/gophermart/main.go -d="host=localhost port=5432 user=postgres password=12345678 dbname=gophermart sslmode=disable"
    

Обновление шаблона тестов

Чтобы иметь возможность получать обновления автотестов и других частей шаблона, выполните команду:

git remote add -m master template https://github.com/yandex-praktikum/go-musthave-diploma-tpl.git

Для обновления кода автотестов выполните команду:

git fetch template && git checkout template/master .github

Затем добавьте полученные изменения в свой репозиторий.

practicum-gophermart's People

Contributors

v1tbrah avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.