Skip to content

rickardinho/app

 
 

Repository files navigation

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 use tape and are transpiled from ES6 using babel-register.
  • Run the tests using:
npm test

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.

  • Istanbul is used for test coverage. Run istanbul with:
npm run coverage

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]

  • set of stringified objects
  • num increments automatically from 1

RSVPs

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

  • set of userIDs
  • Three possible attendance statuses: going, notGoing, maybe

Photos

photos:event:[num] Stringified object with:

  • photoURL {string}
  • userID {string}
  • timestamp {number}

User's deleted photos

photos:event:16|[userID]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 76.7%
  • CSS 22.7%
  • HTML 0.6%