GithubHelp home page GithubHelp logo

txn's Introduction

##TXN

###Dev Startup

nf start -x 8080 -e env/dev.env

###What

Messing around with various APIs (Stripe), technologies (AJAX calls w/ client side jQuery), and monitoring and analytics platforms.

For example, wouldn't it be cool if you set an SMS alert to notify you when there's a new craigslist post on super hard-to-find apartments in SF?

Or if you receive a payment on Stripe, send a Twitter message saying #WINRAR ?

###Integration list

###Stack

###Install

Clone the repository

$ git clone https://github.com/skilbjo/txn.git

Install modules and dependencies

$ npm install

Add secret API keys from the super secret email

$ vim .env

Configure the database (assuming postgres is running at /usr/local/var/postgres)

$ postgres -D /usr/local/var/postgres

Ensure the following returns a list of dbs:

$ psql

> skilbjo=# \list

Configuration is now done... time to run the app :D

$ node server.js

Then view the app your browser: http://localhost:8080

###Deploy

git commit -am 'heroku' && git push && git push heroku master

heroku ps

heroku logs -t

heroku open

###Follow Up

  • Switch to jade for templating
  • Twilio API
  • Paypal API
  • Write tests (make tests, Makefile)
  • Use Flash messages

###Useful tricks

If for some reason you get something like this:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen EADDRINUSE

there are likely two node servers running. Close a terminal window and start again. But in case that doesn't work... $ killall node

Another issue gets you this error:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: failed to connect to [localhost:27017]

Just run this: $ postgres -D /usr/local/var/postgres --fork or $ postgres -D /usr/local/var/postgres to start the database (and to kill the database process, run $ killall postgres)

txn's People

Contributors

skilbjo avatar

Watchers

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