Skip to content

Need to sudo before starting server in ch01 #2

@ktomazin

Description

@ktomazin

I get the following error when attempting to start the server:
bash-3.2$ node server.js
events.js:85
throw er; // Unhandled 'error' event
^
Error: listen EACCES
at exports._errnoException (util.js:746:11)
at Server._listen2 (net.js:1112:19)
at listen (net.js:1155:10)
at Server.listen (net.js:1240:5)
at Function.app.listen (/Users/ken.tomazin/IdeaProjects/learning-angularjs-master 2/node_modules/express/lib/application.js:536:24)
at Object. (/Users/ken.tomazin/IdeaProjects/learning-angularjs-master 2/server.js:4:5)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)

The issue is that we are trying to connect on port 80 and you need to sudo on a unix system before doing that:

sudo node server.js

Metadata

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