3rd-Eden / FlashPolicyFileServer

A simple Flash Policy File Server for node
localhost:843
MIT License
39 stars 11 forks source link

Problem attaching to http instance #7

Open dvideby0 opened 9 years ago

dvideby0 commented 9 years ago

@3rd-Eden

I am having trouble trying to attach the policyfile module to my http instance. I am still getting the following:

FlashPolicyFileServer received an error event:
listen EACCES

wherenever I run this code:

var express = require('express');
var app = express();
var server = require('http').createServer(app).listen(process.env.PORT || 9009);
app.use(express.static(__dirname + '/public'));
var pf = require('policyfile').createServer().listen(null, server);

Acccording to their docs I should be able to do this

var pf = require('policyfile').createServer()
  , http = require('http');

server = http.createServer(function(q,r){r.writeHead(200);r.end('hello world')});
server.listen(80);

pf.listen(1337, server, function(){
  console.log(':3 yay')
});