Skip to content

change listen port #52

Open
Open
@lorenzotsi

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions