DRDD2016 / app

0 stars 1 forks source link

Spark

This project needs Node 5.6 or greater to run.

How to run

  1. Clone this repository

  2. npm install it

  3. Set the environment variables (see below)

  4. Run the server with nodemon in a terminal window with:

    npm run start:dev

    Be sure you to have nodemon installed globally.

  5. Run the webpack dev server in a separate terminal window with:

    npm run dev

The app will be accessible from localhost:8080. The main app server runs on localhost:9000. The webpack dev server is set up to reroute requests to the main app server via proxy.

Testing

Tests require a separate Redis database to run, referenced by a DEVELOPMENT environment variable.

A pre-test script runs test/utils/initDB.js to pre-populate the testing database with dummy values. Dummy values are removed by the tests themselves.

Environment variables

For the main app

REDISCLOUD_ONYX_URL=*url for your main redis database*
CLIENT_ID=*your facebook developer client id*
CLIENT_SECRET=*your facebook developer client secret*

For testing

DEVELOPMENT=*url for your testing redis database*
CLIENT_ID=*your facebook developer client id*
CLIENT_SECRET=*your facebook developer client secret*

Database structure

Events

event:[num]

RSVPs

RSVP:event:[num]|[attendance status]

Photos

photos:event:[num] Stringified object with:

User's deleted photos

photos:event:16|[userID]