#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.
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
.
- Git clone
- Make sure you have postgres set up with user
postgres
with passwordpostgres
. So create the user with that password. To use another user, change the knex connection config in the code. postgres
user should have createdb priviledges. To do so:ALTER USER postgres createdb
in psql.- Run the
psql_script.sql
script into postgres. Try usingpsql -U postgres -a -f psql_script.sql
. - Rename
sample_config.js
toconfig.js
. - Fill in
config.js
file with appropriate dev API access tokens. scotch.io has some great guides on how to do this.