Skip to content

Latest commit

 

History

History
80 lines (63 loc) · 2.24 KB

README.md

File metadata and controls

80 lines (63 loc) · 2.24 KB

Missing Children Society of Canada

Description

This project is to capture users who want to register with the system. Registration is done by authenticating against 3rd party social media providers; such as Twitter, Instagram and Facebook.

Getting Ready For Development

Prerequisites

You need the following items installed in order to work on this application

Setting up the Application

Create a fork of this repository on GitHub to your account.

Clone the fork on your machine

Open up your console and start mongodb

mongod

Change your directory to the root of the project if you haven't done so and install all the node modules.

cd C:/project/directory/here
npm install

Running the Application

We need to set the environment variable MONGO_DB to the url of the mongo database you want to use. This will differ for Windows and Linux/Mac users

Linux/Mac

MONGO_DB=mongodb://url-to-your-database:port

Windows

set MONGO_DB=mongodb://url-to-your-database:port

Double-check if the variable has been set by outputting the variable

Linux/Mac

echo $MONGO_DB

Windows

echo %MONGO_DB%

After we confirm MONGO_DB has the correct value we can run the application

node server.js

Congrats the app is now running at http://localhost:8080

To make our lives easier during development, install nodemon for automatic restart of the node server.

npm install -g nodemon
nodemon server.js

Configuration

  • FACEBOOK_CONSUMER_KEY: Consumer Key
  • FACEBOOK_CONSUMER_SECRET: Consumer Secret
  • FACEBOOK_CALLBACK_URL: Call Back URL
  • TWITTER_CONSUMER_KEY: Consumer Key
  • TWITTER_CONSUMER_SECRET: Consumer Secret
  • TWITTER_CALLBACK_URL: Call Back URL
  • INSTAGRAM_CONSUMER_KEY: Consumer Key
  • INSTAGRAM_CONSUMER_SECRET: Consumer Secret
  • INSTAGRAM_CALLBACK_URL: Call Back Url
  • INSTAGRAM_REGISTRATION_CALLBACK_URL: Registration Call Back URL
  • MONGO_DB: Connection to datastore
  • PORT: Port service runs on; default is 8080