To install dependencies:
bun installTo run:
bun run src/server.tsThis project was created using bun init in bun v1.1.6. Bun is a fast all-in-one JavaScript runtime.
-
Check out
package.jsonon how to run in dev mode or test. Using the httpie cli tool ( or any one of your choice) -
endpoints below
-
Endpoint:
/api/postCMD: run
http localhost:3000/api/post url="https://github.com"Response:
HTTP/1.1 200 OK Content-Length: 85 Date: Thu, 25 Jul 2024 12:05:51 GMT content-type: text/plain;charset=utf-8 handled form data called and things went well. URL -> https://yumshortener/nsL -
Endpoint:
/api/geturlCMD: run
http localhost:3000/api/geturl?url="j7o"Response:
HTTP/1.1 200 OK Content-Length: 49 Date: Thu, 25 Jul 2024 15:11:34 GMT content-type: text/plain;charset=utf-8 53942 | e22 | https://warp.com/ -
Endpoint:
/api/geturl/redirectCMD: run
http localhost:8080/api/geturl/redirect?url="j7o"Response:
HTTP/1.1 308 Permanent Redirect Content-Length: 14 Date: Thu, 25 Jul 2024 15:14:00 GMT Location: https://warp.com/ content-type: text/plain;charset=utf-8 Redirected....
-
TODO - implement Redis ...