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

Fix dual app bug #4

Open
ericuldall opened this issue Feb 25, 2016 · 0 comments
Open

Fix dual app bug #4

ericuldall opened this issue Feb 25, 2016 · 0 comments

Comments

@ericuldall
Copy link
Member

ExpressMVC should be able to run multiple app instances on different ports and/or ip's without issue, however there is currently an issue doing so. I believe this stems from the app configs being shared across EMVC globally. We need to make sure each app gets a unique version of express with it's own unique options.

Example:

var ExpressMVC = require('express_mvc');
var app_a = new ExpressMVC.App({port: 8080});
var app_b = new ExpressMVC.App({port: 8081});
var router = new ExpressMVC.Router('/');
router.addRoute(new router.Route('GET', '/', function(req, res){ res.write('test'); res.end();}));

app_a.addRouter(router);
app_b.addRouter(router);

app_a.listen();
app_b.listen();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant