Hearsay frontend application
JavaScript CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
__tests__ initial commit Aug 11, 2014
client update mongoose to support mongodb 3.x Oct 2, 2015
config update readme and debug names Aug 14, 2014
gulp update gulp flow and dependencies Dec 6, 2014
handlers add handler for content route Apr 14, 2015
helpers add KQED mindshift to list Dec 21, 2014
middleware initial commit Aug 11, 2014
modules
routes
services coerce values to numbers Jul 23, 2017
setup add mongoose error handling and automatic reconnect Oct 4, 2014
.gitignore
LICENSE update license Aug 26, 2014
README.md Update README.md Dec 10, 2014
app.js
gulpfile.js initial commit Aug 11, 2014
package.json update mongoose to support mongodb 3.x Oct 2, 2015

README.md

Hearsay Live News App (Frontend)

Introduction:

A clean reading experience for your news. Live demo.

Accompanying repos:

hearsay

Landing Article View

Built with:

Testing:

Dependencies:

Install dependencies:

  • brew/apt-get install nodejs
  • brew/apt-get install redis
  • brew/apt-get install mongodb
  • npm install -g mocha
  • npm install -g gulp
  • npm install

Environment variables:

  • PORT - Port exposed by this component.
  • example: 3000
  • DEBUG - Debug output (* for all) (optional)
  • example: *
  • NODE_ENV - Environment ('development', 'staging', 'production')
  • example: development
  • CLIENT_API_PATH - Path to the client REST api (relative)
  • example: /api
  • CLIENT_DOMAIN - Server domain
  • example: localhost
  • APPSECRET - Application session secret
  • example: sOmeCrAzYhAsH894372
  • SESSION_KEY - Application session secret (optional)
  • example: express.sid (defaults to connect.sid)
  • REDIS_URL - Redis url (including authentication)
  • example: redis://user:pass@localhost:6379
  • REDIS_DB - Redis database number (optional)
  • example: 1
  • REDIS_SESSION_PREFIX - Prefix for redis session entries (optional)
  • example: sess:
  • MONGO_URL - MongoDB url (including authentication)
  • example: mongodb://user:pass@localhost:27017/mydatabase

Run tests:

  • npm test

Run the application:

  • set environment variables
  • gulp
  • (create a shellscript with the above for convenience if you want)
  • navigate your browser to http://localhost:3000 (or whatever port you chose for PORT)

Development shellscript example:

#!/bin/sh
export PORT=3000 \
export DEBUG="*" \
export NODE_ENV="development" \
export APPSECRET="somecrazyhash" \
export CLIENT_API_PATH="/api" \
export CLIENT_DOMAIN="localhost" \
export CLIENT_API_DOMAIN="localhost" \
export SESSION_KEY="express.sid" \
export MONGO_URL="mongodb://localhost/hearsay" \
export REDIS_URL="redis://localhost:6379" \

gulp