Skip to content
This repository has been archived by the owner on Jun 22, 2019. It is now read-only.

A Node.Js example to handle users and sessions in dashDb

License

Notifications You must be signed in to change notification settings

FMGordillo/express-dashdb-passport-example

Repository files navigation

express-dashdb-passport-example

A simple Node.js application using:

  1. express-generator to create the Express application
  2. Passport.js and passport-local to authenticate our users
  3. ibm_db and connect-db2 to connect and persist sessions in the database

Deploy locally

git clone https://github.com/FMGordillo/express-dashdb-passport-example.git

Then you must create a .env file and put your dashDb DSN in there, as this example:

DASHDB_DSN=DATABASE=XXX;HOSTNAME=XXX;PORT=50000;PROTOCOL=TCPIP;UID=XXX;PWD=XXX;

npm install
npm start

Deploy on IBM Cloud

First you must create an IBM Cloud account The package cfenv handles VCAP_SERVICES to get the credentials. More info, coming soon

TODOs

  • Create Deploy on IBM Cloud button
  • Complete README
  • Make an example for login/register handler