Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 1.15 KB

README.md

File metadata and controls

13 lines (11 loc) · 1.15 KB

#Postgres Oauth example A demonstration of postgres oauth in node. Heavily follows this guide from scotch.io, except I use postgres in place of Mongo for the database, and Jade in place of EJS for the html views.

Server-side Setup

This app requires a basic postgres setup. It also requires a lot of private Oauth application setup from Facebook, Twitter, and Google involving developer access to their Oauth services. This involves filling in config.js.

  1. Git clone
  2. Make sure you have postgres set up with user postgres with password postgres. So create the user with that password. To use another user, change the knex connection config in the code.
  3. postgres user should have createdb priviledges. To do so: ALTER USER postgres createdb in psql.
  4. Run the psql_script.sql script into postgres. Try using psql -U postgres -a -f psql_script.sql.
  5. Rename sample_config.js to config.js.
  6. Fill in config.js file with appropriate dev API access tokens. scotch.io has some great guides on how to do this.