node-activities-boilerplate

0.0.7 • Public • Published

node-activities-boilerplate

Copyright (c) 2012 VMware, Inc

node-activities-boilerplate is a fork of node-express-boilerplate which is a simple express boilerplate app which does SSO using Facebook, Twitter and GitHub

Instead of raw messaging back and forth between clients and server, node-activities-boilerplate uses activitystrea.ms to send well structured messages(activities) and aggregate them in an Activities MongoDB collection. It also uses Redis' PubSub to notify clients in real time of what changes are happening in the db and has client side logic to update the UI appropriately. This functionality is delivered via the package activity-streams-mongoose

New Features include:

  • Bootstrap as the foundation css
  • Jade Templates which are executable server-side and client-side
  • New Social Networking Look
  • Persistence of activities and streams to MongoDB
  • Real time syndication of stream data using Redis

Core Features include:

  • Bundling socket.io and integrating with the express session store so data can be shared
  • Providing pre-made hooks to authenticate users via facebook/twitter/github
  • An assetmanager that concatenates/mangles/compresses your CSS/JS assets to be as small and fast to deliver as possible, as well as cache busting using MD5 hashes
  • Auto updates of the browser (inline/refresh) as soon as CSS/JS/template-files are changed in order to remove all those annoying “save, tab, refresh” repetitions
  • Notifications to your computer/mobile phone on certain user actions
  • Sane defaults in regards to productions/development environments
  • Logs errors to Airbrakeapp.com in order to track any errors users are encountering
  • Auto matching of urls to templates without having to define a specific route (such as, visiting /file-name/ tries to serve file-name.ejs and fallbacks to index.ejs - this is helpful for quick static info pages)

Install on dev machine

git clone https://github.com/mape/node-express-boilerplate <myproject>
cd <myproject>
npm install
  • Edit siteConfig.js if needed
  • If you change the activities templates you need to regenerate the client side version of them, you can do this with clientjade
npm install -g clientjade
clientjade views/*.* > public/js/templates.js
  • Run locally
node server.js

Install on CloudFoundry

  • Install vmc if you have not already done so
sudo gem install vmc --pre
  • Edit manifest.yml to have a unique name for your app. Replace "asms" with a name you want

  • Deploy the app to Cloud Foundry

  vmc push --nostart

Get keys for all social networks and services

Build your Facebook App at

Build your Twitter App at

Build Github App at

  • Run this command with your keys
export APP_NAME=<your_name>
vmc env-add $APP_NAME airbrake_api_key=your_key
vmc env-add $APP_NAME github_client_id=github_id
vmc env-add $APP_NAME github_client_secret=github_secret
vmc env-add $APP_NAME facebook_app_id=fb_id
vmc env-add $APP_NAME facebook_app_secret=fb_secret
vmc env-add $APP_NAME NODE_ENV=production
vmc env-add $APP_NAME twitter_consumer_key=twitter_key
vmc env-add $APP_NAME twitter_consumer_secret=twitter_secret
vmc env-add $APP_NAME TMP=tmp

Finally

  vmc start

License

Apache License

See LICENSE file for more details and node-express-boilerplate app License

Readme

Keywords

none

Package Sidebar

Install

npm i node-activities-boilerplate

Weekly Downloads

0

Version

0.0.7

License

none

Last publish

Collaborators

  • ciberch