These instructions have been updated to work with CloudFoundry v2
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
- 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
- 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)
git clone https://github.com/mape/node-express-boilerplate <myproject>
cd <myproject>
npm install
-
Edit siteConfig.js if needed
-
Run locally
node server.js
- Install vmc if you have not already done so
sudo gem install cf
- Deploy the app to Cloud Foundry
cf push --nostart
- https://developers.facebook.com/apps
- Add your app url to the Facebook App Domain list
- https://dev.twitter.com/apps/new
- Use callback url http://your-app-name.cfapps.io/auth/twitter/callback
- https://github.com/settings/applications/new
- Use callback http://your-app-name.cfapps.io/auth/github/callback
- Run this command with your keys
export APP_NAME=<your_name>
cf set-env $APP_NAME airbrake_api_key=your_key
cf set-env $APP_NAME github_client_id=github_id
cf set-env $APP_NAME github_client_secret=github_secret
cf set-env $APP_NAME facebook_app_id=fb_id
cf set-env $APP_NAME facebook_app_secret=fb_secret
cf set-env $APP_NAME NODE_ENV=production
cf set-env $APP_NAME twitter_consumer_key=twitter_key
cf set-env $APP_NAME twitter_consumer_secret=twitter_secret
cf set-env $APP_NAME TMP=tmp
cf start
Apache License
See LICENSE file for more details and node-express-boilerplate app License