Questions tagged as 'node.js'

0
answers

Error with Unexpected token?

I have a project on my machine that uses node.js. It runs smoothly, but when I pass it to my server on c9.io (Linux) it is giving this error: user:~/workspace/guidebot (master) $ node index.js /home/ubuntu/workspace/guidebot/index.js:44 con...
asked by 19.01.2018 / 17:48
0
answers

How to run a .js on node for the large

I have a server.js in a subdomain I am using laravel-forge / digital ocean but I can not run this file. In localhost I would open the cmd and in the project folder would run the "node server.js" and it runs but I do not know how to run that f...
asked by 19.01.2018 / 14:17
0
answers

FTP - Check for file existence on nodejs

I have a folder on a server, accessible via FTP. I would like to know a way in NODEJS where passing the file name, it would return me whether the file exists or not. I found an implementation in DELPHI - code     
asked by 16.01.2018 / 23:31
1
answer

How to interact with another API running on a different port with Node?

Good afternoon guys, I'm having to create 3 micro services on nodejs, but I still have not been able to interact with them. Ex: I have 3 APIs that two are clients of the first one, I want to know how I make interaction between them being that...
asked by 14.01.2018 / 15:36
0
answers

node.js / receiver.js

I have installed nodejs with the following paths:  ./server.js ./node_modules/ws/lib/ws ./node_modules/ws/lib/Receiver.js In server.js script I declare array var clients = [] Question: How can the readBuffer (bytes) function of the Receiver.js c...
asked by 12.01.2018 / 12:18
0
answers

List amount of files in a folder

I'm working on a small system and am using web for N reasons, easy to customize, working full screen (f11), everything is flowing just fine. I came in a part that I need to list the amount of files that are within a certain directory and I saw t...
asked by 11.01.2018 / 17:32
1
answer

Electron - TypeError var.on is not a function

Following the standard primary structure templates offered by the Electron documentation ( link ), I encountered errors as the development of an application. Displaying the required information, the message that appeared was: App threw an err...
asked by 23.01.2018 / 09:07
1
answer

EJS include dynamic

Using Express 4 and EJS template engine, I came across the following: Let's say I have the following structure: meu_projeto/ +-- server.js +-- views/ ¦ +-- layout.js ¦ +-- admin/ ¦ ¦ +-- index.js ¦ ¦ +-- blog/ ¦ ¦ ¦ +-- in...
asked by 10.01.2018 / 16:08
2
answers

Assign return from findOne to a global variable node Node.js

I could not do this assignment, is something missing? global.pedido = db.collection('configuracoes').findOne({ parametro: "pedido_num"})     
asked by 07.01.2018 / 16:11
1
answer

I can not use Hosting on Firebase

When I try to make the hosting using the "firebase init" and then I choose the project and the host, I apply the "firebase deploy" but when I open the link this screen appears: What should I do?     
asked by 12.01.2018 / 16:55