cprox

A basic HTTP proxy & url shortener written in Crystal

cprox

A basic HTTP proxy and url shortener written in Crystal.

Proxy API

GET /forward/:code

Forwards to the URL that was registered with :code

POST /code/:code

Register the URL :url with a given code. The code should be specified in the POST body with JSON:

{
    "url": "some URL here"
}

DELETE /code/:code

Delete the given :code from the registry.

Installation and development

All you need is the Crystal toolchain to build and run this project. Go here to learn how to install the toolchain.

When you have it installed, pull down the dependencies:

$ shards install

When that's done, run the app:

$ crystal run
Repository

cprox

Owner
Statistic
  • 5
  • 0
  • 1
  • 0
  • 3
  • over 4 years ago
  • April 2, 2020
License

MIT License

Links
Synced at

Thu, 07 Nov 2024 20:36:52 GMT

Languages