This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Beta-Web-Site", | |
"description": "Build environment for the Beta mygov.scot web site", | |
"version": "0.0.1", | |
"dependencies": { | |
"q": "^1.2.0", | |
"socket.io": "^1.3.5" | |
}, | |
"repository": { | |
"type": "git", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Content Source - fetches published content and notifies a ContentHandler of each published item. | |
**/ | |
module.exports = function (config, sessionId, contentFormatter, contentHandler) { | |
var restler = require('restler'); | |
var async = require('async'); | |
var authHeader = { | |
headers : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = require('express')(); | |
var server = require('http').Server(app); | |
var io = require('socket.io')(server); | |
var grunt =require('grunt'); | |
server.listen(9075); | |
app.get('/', function (req, res) { | |
res.send('Socket IO listnening'); | |
res.sendfile(__dirname + '/index.html'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ContentHandler that emits a socketio message on content creation | |
// | |
// The ContentSource will call the method of this object as it fetched the content. | |
module.exports = function() { | |
var fs = require('fs'); | |
var df = require('dateformat'); | |
var del = require('del'); | |
var yaml = require('js-yaml'); |