Last active
December 11, 2015 01:18
-
-
Save rrichardson/4521968 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 flatiron = require('flatiron'), | |
ecstatic = require('ecstatic'), | |
socketful = require('socketful'), | |
restful = require('restful'), | |
resourceful = require('resourceful'); | |
var app = module.exports = flatiron.app; | |
app.use(flatiron.plugins.http, { | |
before: [ | |
ecstatic(__dirname + '/public') | |
] | |
}); | |
//var models = require('./models'); | |
app.resources = require('./models').fixtures; | |
//app.resources.Creature = models.Creature; | |
//app.resources.Album = models.Album; | |
app.use(restful); | |
app.use(socketful); | |
app.start(8000, function(){ | |
socketful.createServer(app.resources, { server: app.server }); // Socket.io | |
// -------------------------------------------------- // | |
console.log(' > http server started on port 8000'); | |
console.log(' > visit: http://localhost:8000/ '); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment