cprox

Version, currently master branch1 version
  • master branchlatestMay 1, 2020

github.com/arschles/cprox

A basic HTTP proxy & url shortener written in Crystal

6 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  cprox:
    github: arschles/cprox
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.33.0
License
MIT
Author
Aaron Schlesinger
Target
  • cprox from src/cprox.cr

Dependencies

Runtime Dependencies

README

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