All Projects â†’ cjdenio â†’ shorty

cjdenio / shorty

Licence: other
High-performance link shortener

Programming Languages

rust
11053 projects
PLpgSQL
1095 projects
python
139335 projects - #7 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to shorty

Bon
🍮 A small, simple/minimal self hosted URL shortener written in Go (Golang).
Stars: ✭ 12 (-75%)
Mutual labels:  self-hosted, link-shortener, link-shortener-api
rocket-rest-api-with-jwt
A Rusty Rocket fuelled with Diesel and secured by JWT
Stars: ✭ 62 (+29.17%)
Mutual labels:  rocket-rs, diesel-rs
rfcbot-rs
Coordinates asynchronous decision making on Rust repositories. Status of tracked issues and PRs can be viewed at https://rfcbot.rs.
Stars: ✭ 143 (+197.92%)
Mutual labels:  rocket-rs, diesel-rs
urlzap
⚡ī¸ Your own static URL shortener
Stars: ✭ 57 (+18.75%)
Mutual labels:  self-hosted, link-shortener
wombag
Wombag is the alternative, lightweight backend for your Wallabag apps. Wombag supports the Wallabag API.
Stars: ✭ 42 (-12.5%)
Mutual labels:  self-hosted
bin
highly opinionated, minimal pastebin
Stars: ✭ 97 (+102.08%)
Mutual labels:  self-hosted
trusted-cgi
Lightweight runner for lambda functions/apps in CGI like mode
Stars: ✭ 150 (+212.5%)
Mutual labels:  self-hosted
redir
🧭 Full-featured, self-hosted URL shortener.
Stars: ✭ 61 (+27.08%)
Mutual labels:  link-shortener
personal-crm
🗂 Minimalist personal CRM to keep in touch with contacts
Stars: ✭ 23 (-52.08%)
Mutual labels:  self-hosted
Intranet-Home-Page
Intranet Home Page is a highly-configurable self-hosted browser homepage with integrations for public and local data feeds.
Stars: ✭ 56 (+16.67%)
Mutual labels:  self-hosted
openbsd-selfhosted
🐡 Shell script for self-hosting cloud, email, and git services
Stars: ✭ 41 (-14.58%)
Mutual labels:  self-hosted
uptime-kuma
A fancy self-hosted monitoring tool
Stars: ✭ 27,425 (+57035.42%)
Mutual labels:  self-hosted
dppm
An easy way to install and manage server applications
Stars: ✭ 107 (+122.92%)
Mutual labels:  self-hosted
SaorTech-cloud-services
A range of scripts to provision and configure open source cloud services.
Stars: ✭ 23 (-52.08%)
Mutual labels:  self-hosted
chatcola
chatcola.com messaging server - self-host your messages without multi-domain nightmare!
Stars: ✭ 25 (-47.92%)
Mutual labels:  self-hosted
rusty-bunny
a tool that lets you write smart bookmarks
Stars: ✭ 20 (-58.33%)
Mutual labels:  rocket-rs
exatorrent
Easy to Use Torrent Client. Can be hosted in Cloud. Files can be streamed in Browser/Media Player.
Stars: ✭ 1,557 (+3143.75%)
Mutual labels:  self-hosted
stashbox
Your personal Internet Archive
Stars: ✭ 42 (-12.5%)
Mutual labels:  self-hosted
foolang
A toy programming language.
Stars: ✭ 33 (-31.25%)
Mutual labels:  self-hosted
Segnalibro
Save and comment your favorite links from the web. It's just a bookmarking application.
Stars: ✭ 14 (-70.83%)
Mutual labels:  self-hosted

shorty

🔗 High-performance link shortener written in Rust

Deploy

⚠ī¸ WARNING ⚠ī¸

Redis-backed installations are no longer supported. To switch to Postgres, please see the migration guide.

💾 Hosting

In addition to being easy to build from source (cargo build --release), shorty is available as a Docker image on both Docker Hub and GitHub Container Registry.

🏁 Prerequisites

  • Some sort of Docker or Rust-compatible hosting. clb.li runs on CapRover, for example, but Heroku is a good free option.
  • A Postgres database (Heroku Postgres is your friend if you're running shorty on Heroku)

🌎 Environment variables

  • DATABASE_URL - a valid Postgres URL, e.g. postgres://user:password@localhost:5432/database (automatically set when using Heroku Postgres)
  • TOKEN - your desired API token; only required if you're using the API (described below).
  • PORT - Change the port the server listens on; defaults to 8000

👀 Public links page

There's a page available at /links that displays all links with the public field set to true.

Check out clb.li/links for an example!

If you haven't set up a redirect for the root URL, it'll show this page as well.

📡 API

You can use shorty's API to add/remove links. No UI is available quite yet, but will be soon!

Authentication

Provide your TOKEN (described above) as a bearer token, so set the Authorization header to Bearer <token>. Example: curl -H "Authorization: Bearer token1234" http://localhost:8000/api/example/route

Requests

POST requests must all contain JSON payloads. x-www-form-urlencoded is not supported.

Responses

All responses are JSON, and follow this rough schema:

{
  // False if something went wrong
  "ok": true,

  // Will be a string if something went wrong
  "err": null,

  "data": {
    // Response data here...
  }
}

📋 GET /api/link - list all links

This method has no options.


➕ POST /api/link - create a named link

Options:

  • url (string, required) - The URL the redirect to.
  • name (string, optional) - The link's name. Leave blank to randomly generate a 5-character ID.
  • public (bool, optional) - Whether or not to display this link on the public links page.
  • description (string, optional) - This field is displayed on the public links page (if public is set to true)

ℹī¸ Note: / and root are special values for <name> that create redirects for the root URL. You may use either.


📝 PATCH /api/link/<name> - update a named link

Options:

This method takes the same parameters as POST /api/link, except they're all optional.

ℹī¸ Note: Please URL encode the <name> parameter if necessary; / will become %2F


❌ DELETE /api/link/<name> - delete a named link

example: curl -X DELETE http://localhost:8000/api/link/gh

ℹī¸ Note: Please URL encode the <name> parameter if necessary; / will become %2F


🚗 Roadmap

Check the issues page for more information on in-progress features!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].