Questions tagged as 'node.js'

1
answer

fs.copyFile is not a function

I'm trying to manipulate files with NodeJS, using fs.copyFile on my server (Debian Jessie), but I can not copy files. I've done everything to try to solve the problem, I've even copied exactly the example given in the documentation and re...
asked by 27.09.2017 / 03:23
1
answer

Filter with Node.JS

I have a list of saved items in a Mongo collection, I'd like to know how to filter the original array. Follow the code api.filtra = function (req, res) { model.find() .then(function(itens) { for(i = 0; i < itens.leng...
asked by 03.09.2017 / 07:42
1
answer

Return JavaScript script with Node.JS

Using Node.JS I want to read a JavaScript script in a folder and return it. It turns out that when I access the file through the browser, the code appears normally. However, the script is not embedded in the HTML page using the <script>...
asked by 03.09.2017 / 02:40
1
answer

npm install 404 error

I started a Vue.js course and I'm installing a feature by node.js but I'm having problems with the npm command, take a look; What's wrong with my node in this command below? npm install vue vue-resource bootstratp font-awesome --save...
asked by 19.09.2017 / 12:38
1
answer

How to make notifications the same as Facebook? AngularJS or JavaScript [closed]

I'd like to include notifications in my app. The app will be in Ionic, AngularJS, jQuery, NodeJS ... is there a way for the app to run a function at every X time? This function would give a get in NodeJS ...     
asked by 21.10.2017 / 23:13
1
answer

Session library for NodeJS / HapiJS?

I'm doing an email application and got to the part where I need to do the session and login part, but I've never done it before, I'm using HapiJS as a server and I'd like to know which session libraries are best, and what other resources that I...
asked by 24.08.2017 / 22:00
1
answer

Transfer files from server to client ?? [closed]

I am generating a PDF on the NodeJS server and when it is ready I want it to be sent to the client and downloaded, all through a GET request. The file will be generated on the server, stored in a specific address and then returned in the GET req...
asked by 02.08.2017 / 15:07
1
answer

CRUD MySQL with NodeJS: How to use Pool correctly?

I created two files to test the use of MySQL with NodeJS as below, but I'm finding the answer slow and I think I'm doing something wrong: DOUBTS : 1) Is this way to access the database the most correct? That is, every time I need to save...
asked by 23.07.2017 / 17:39
2
answers

Error npm and node Ubuntu

I have had many problems installing npm and node in ubuntu, I now have the following error: npm : Depende: nodejs mas não será instalado mais um monte de dependências... E: Impossível corrigir problemas, você manteve (hold) pacot...
asked by 27.06.2017 / 16:46
1
answer

Use delete method with express

Hello, I'm trying to send a value of a form (id) that will be handled by the expression (I do not know the technical terms for this, if you can help me too), I've tried a lot but I can not pass the id parameter on action and do not access the app...
asked by 16.08.2017 / 20:34