url-shortner

module
v0.0.0-...-8b41f8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2024 License: MIT

README

url-shortner

Screenshot 2023-07-16 at 5 11 40 AM

Dependencies:

  • make sure you have mysql server and redis server installed on your machine.
  • To install mysql server on mac: brew install mysql
  • To install redis server on mac: brew install redis

Running the server:

  • git clone https://github.com/gitynity/go-web-Projects.git
  • cd go-web-Projects/URLShortner && make build
  • ./bin/url-shortner

Requests:

  • POST: curl -X POST 'localhost:8080/add-url?long_url=https://golang.ir/play/'
  • GET: curl -X GET 'localhost:8080/get-long-url?short_code=rJQgckya'
  • GET: curl -X GET 'localhost:8080/get-short-url?long_url=https://goplay.tools/'
  • DELETE: curl -X DELETE 'localhost:8080/remove-url?long_url=https://golang.ir/play/'

Directories

Path Synopsis
cmd
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL