N
N
nezzard2014-10-12 21:05:53
JavaScript
nezzard, 2014-10-12 21:05:53

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

3 answer(s)
N
nezzard, 2014-10-12
@nezzard

Everyone found the answer, it was necessary to put port: 8888 inside with a comma

A
akarin, 2014-10-12
@akarin

Try running it together with the server, since the server is most likely already running, or specify a different port.

A
Alexander Zelenin, 2014-10-12
@Zav

Try to run like this:
require('peerflix')()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question