Answer the question
In order to leave comments, you need to log in
How to run a module in node js?
Quite a noob in node.js, but I have a question. If I run the node module through the terminal, then it starts the server, and I can go to the web server at the address.
When I write in my app.js var peerflix = require('peerflix');
peerflix is that module. The module works, I get the necessary data, but the web server does not start. Why?
Answer the question
In order to leave comments, you need to log in
Everyone found the answer, it was necessary to put port: 8888 inside with a comma
Try running it together with the server, since the server is most likely already running, or specify a different port.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question