Giter VIP home page Giter VIP logo

erlio's Introduction

erlio

Erlang url shortener project, visit erlio.in.

Goals

  • webmachine application
  • eunit tests included
  • upgradable via hot code loading
  • web interface
  • gather stats

Author(s)

Copyright

Copyright (c) 2012 Tim McGilchrist [email protected]. All rights reserved.

TODO

  • main resource that translates short urls to a 302 redirect (DONE)
  • short resource serves up index.html (DONE)
  • tweak css so we see the full path in the UI. (DONE)
  • port to use postgres database (*)
  • add goto button on UI to see we get 302 redirect.
  • write out long form blog post as Markdown
  • checking what gen_S are running

Nice to have:

  • fault tolerance for event handler, how should it's supervisor look, what happens when something errors out?
  • generate shorter unique links
  • gen_event calls to tally statistics on how many urls get visited, etc
  • clean up javascript to provide a copy to paste bin implementation
  • deploy to heroku (DONE) (http://fast-sea-3371.herokuapp.com/)
  • check whether link already exists and return correct code
  • add support for viewing events generated by the server

Deploy

Setup heroku

heroku create --buildpack "https://github.com/archaelus/heroku-buildpack-erlang.git"

To deploy latest commited change just:

git push heroku master

The last line of the output will show the url for your app.

Uses the heroku build pack here https://github.com/archaelus/heroku-buildpack-erlang If the app doesn't start use heroku logs to see why it's failing

Resources

  • erlio_assets_resource - serves static assets like JS/CSS/HTML. Also gets a link and provides a 302 redirect to the correct location
  • erlio_link_resource - gets links from the application
  • erlio_links_resource - creates links from the application
  • erlio_stats_resource - displays the stats for the application

Basic Structure

erlio_sup
 |
 \--------------------------------------------------
     |                       |                  |
 webmachine_mochiweb    erlio_store        erlio_events
  • erlio_sup - the main supervisor under which everything lives
  • webmachine_mochiweb - http / REST resources
  • erlio_store - datastore that talks to a persistent data store
  • erlio_events - out of band event processing, gathering statistics

erlio's People

Contributors

tmcgilchrist avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kkoci

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.