Code Monkey home page Code Monkey logo

test-ozon's Introduction

Go Report Card

This a small link shortener Gin based-app for ozon tech team

Prerequisites

Have docker installed

How to get app working

Clone my repository to your local machine git clone github.com/mishaRomanov/test-ozon

Go to cloned directory and run with docker compose docker compose up -d

How to change the storage type

Go to docker-compose.yml and find environmental variable STORAGE Set it to either postgres or cache

How to use

To make link shorter use POST method on /link/add endpoint: curl --location 'localhost:8080/link/add'\ --header 'Content-Type: application/json' \ --data '{"url":"google.com"}'

Which returns a new link New link generated: localhost:8080/link/Nm_5MWFiYz

To get your old link back, you make a GET request to /link/your_link endpoint curl --location 'localhost:8080/link/NjA2NjkyZT'

And it returns you full link in JSON "google.com"

Also feel free to use /about endpoint to get all the information you need to test the app.

test-ozon's People

Contributors

misharomanov avatar

Watchers

 avatar

test-ozon's Issues

env variables problem

the way user chooses the type of storage is pretty naive and not convenient at all. i should have used environmental variables, but I think I am not allowed to change stuff now since my deadline passed weeks ago. I might create a new branch and fix this all and also include docker file and how-to setup instructions

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.