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

change listen port #52

Open
lorenzotsi opened this issue Aug 27, 2018 · 0 comments
Open

change listen port #52

lorenzotsi opened this issue Aug 27, 2018 · 0 comments

Comments

@lorenzotsi
Copy link

Hi, more than an issue, it is a question
I was wondering if there is a way to change listen port from the app.js file, instead of using "micro -p 8080", something like

...
let rout = router(get('/hello/:who', hello), get('/*', notfound));
let server = micro(rout);
var port = process.env.PORT || 8080;
server.listen(port, () => console.log('microrouter listening on port ' + port));

Thanks, Lorenzo

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

1 participant