Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

ZloeSabo/bash-url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bash-url-shortener

Why not use bash?

Depends

bash, socat, tr, sed, awk, lockfile, rev

Run

To run this you need to install socat. Then:

socat TCP4-LISTEN:8080,fork EXEC:"bash ./server"

Add url

To add url you need to pass json like that:

curl -H "Content-Type: application/json" -X POST -d '{"url":"http://google.com"}' server:port

The output will be

{"url":"://server:port/code"}

Use redirecting

Just open url in your browser

About

Why not use bash?

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages