Git Product home page Git Product logo

gournay's Introduction

Gournay is a URL shrinker. The name is a horrible pun. I started with "shrink", referring to psychiatrists, then found Kevin Gournay, involved in mental health, and who happens to have "Go" as part of his last name. See, I told you it was bad. :)

Try it

http://gournay.herokuapp.com/

building locally

go build gournay.go

When pushing to heroku, the app is compiled. When adding new dependencies, remember to run godep save.

running in development

# psql
create database gournay_development;
create table entries (
  url varchar(255),
  hash varchar(5)
);

Local postgres connection string like this, for a database called gournay_development:

export DATABASE_URL="user=andy host=localhost dbname=gournay_development sslmode=disable"

./gournay
# port is 5000 by default

Heroku

Details on using the Heroku buildpack.

  • Create a heroku instance with the custom buildpack
  • Enable the postgres addon with: heroku addons:add heroku-postgresql
  • Heroku binds to a random port, can't hard-code the port. details
  • connect to heroku psql and set up database: heroku pg:psql. Find out database name from connection string, and create the tables.

resources

gournay's People

Contributors

andyatkinson 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.