Skip to content

Navigation Menu

Sign in
Sign up

Repository files navigation

Quotes service

Description

It's a service that shows random quotes, allows to like them and show quote that is pretty similar to a specified one

Additional programs

  1. Taskfile (Optional)
  2. docker-compose or podman-compose
  3. Postman or Yaak

How to run

  1. Run go mod download command to download dependencies

    go mod download

    Or you can initialize everything with the following taskfile command. In that case, you can skip point 2 and start from point 3:

    task init && nano .env
  2. Copy the .env.example file to .env and change variables to what you need

    cp .env.example .env && nano .env
  3. Start the postgres database

    i NOTE: If you're starting the program by running the taskfile command, you can skip this step because db will start up automatically

    export POSTGRES_PORT=5432 POSTGRES_USER=postgres POSTGRES_PASSWORD=postgres POSTGRES_DB=quotes
    cd containers && docker-compose -f database.yml up -d && cd ..

    Or use next taskfile command:

    task db
  4. Run the following command to start server:

    go run main.go

    Or you can run Run http configuration if you are using Goland

    Or you can run the following taskfile command:

    task run
  5. Import postman Quotes collection into Postman program or yaak Quotes collection into Yaak program

    ⚠ WARNING: Postman Quotes collection contains only http requests, because of Postman limitations, so if you want to send graphql or grpc requests it's better to start with Yaak Quotes collection.

  6. Send request throw Postman or Yaak

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /