Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow mounting into express.js application #36

Closed
halfdan opened this issue Feb 27, 2014 · 13 comments
Closed

Allow mounting into express.js application #36

halfdan opened this issue Feb 27, 2014 · 13 comments
Assignees

Comments

@halfdan
Copy link

halfdan commented Feb 27, 2014

The PeerJS server is definitely a nice piece of software, but it would be great if it could be mounted into an existing express.js application. This would allow people to build more advanced applications around the server.

@bachwehbi
Copy link

Plus 1 for this ticket
I definitely Agree with halfdan's comment.

@floatdrop
Copy link
Contributor

I think PeerServer should extend restify object to enable this feature (instead of keeping it in this._app. Also this will allow export application object to grunt-express-server.

@floatdrop
Copy link
Contributor

After some searching around - turns out, that restify can't be used with express.

@bergie
Copy link

bergie commented Apr 3, 2014

@floatdrop there is express-resource which should allow doing similar things as restify with Express

@floatdrop
Copy link
Contributor

@bergie yes, there is. I would write a pull-request to migrate from restify to express, but I don't know about repo owners thoughts on it.

@halfdan
Copy link
Author

halfdan commented Apr 3, 2014

I'm very positive on moving from restify to express!

floatdrop added a commit to floatdrop/peerjs-server that referenced this issue Apr 3, 2014
PeerServer is now instance of express application - this allows to combine it with other express applications.
Listen is deferred - because it now method from express (you can call it later and supply callback for start event).
Constructor now not using `new` (because we mixing in methods to express app)

Closes peers#36
@michelle
Copy link
Member

michelle commented Apr 3, 2014

As I mentioned in a separate thread, we actually switched FROM express to
restify. Happy to consider switching back.

Michelle

On Thu, Apr 3, 2014 at 7:27 AM, Fabian Becker notifications@github.comwrote:

I'm very positive on moving from restify to express!


Reply to this email directly or view it on GitHubhttps://github.com//issues/36#issuecomment-39457213
.

@RangerMauve
Copy link

Any progress on this?
Maybe allowing the PeerJS server to be mounted on just a regular HTTP Server instance?

@guilleliss
Copy link

Looking forward for this too !

@jimmywarting
Copy link

Can't wait 👍

@michelle
Copy link
Member

michelle commented Aug 7, 2014

Sorry for the delay on this--I'll try to get out an expressjs peer server this weekend.

@minicuper
Copy link

To fix request.query for expressjs I use this express workaround:

expressApp.use(function(req, res, next){
  req.query = null;
  next();
})

the middlware should be first in express.

@minicuper
Copy link

Hi, how's it going with migration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants