Giter Club home page Giter Club logo

redirex's Introduction

Redirex

production application

Visit the app at https://zz-redirex.fly.dev/

A form is displayed where you can shorten any valid URL.

The stats route displays a table of all URLs along with the shortened version of the URL and visit count.

local development

  • clone repository
  • Run mix setup to install dependencies and create the local DB
  • Start Phoenix endpoint with iex -S mix phx.server

visit localhost:4000 from your browser.

Dev Notes

I used LiveView to create the web client (see RedirexWeb.LinkLive). I used a Phoenix controller (RedirexWeb.LinkController) to handle both the CSV download and URL redirect.

URLs are shortened to a randomized hash consisting of seven alphanumeric characters. This hash doubles as the primary key for the links table in Postgres.

Automated tests encapsulate basic functionality of the Redirex.Links context, LiveView, and controller actions.

Concurrency performance was tested using ApacheBench using commands like

 ab -n 1200 -c 26 https://zz-redirex.fly.dev/CluhETf

Typical results can be seen here

redirex's People

Contributors

zigahertz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.