module
Version:
v0.0.0-...-8b41f8a
Opens a new window with list of versions in this module.
Published: Mar 10, 2024
License: MIT
Opens a new window with license information.
README
¶
url-shortner
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
¶
|
|
|
|
cmd
|
|
|
|
Click to show internal directories.
Click to hide internal directories.