Questions tagged as 'node.js'

1
answer

Problem with vue-cli

Good afternoon, I made the global installation of the vue-cli npm install -g vue-cli When you try to start a project with the vue init webpack my-project the following error is displayed vue-cli · tunneling socket could not be establishe...
asked by 31.08.2016 / 20:03
1
answer

How to compile the entire project folder for ES5 using babel.js?

I have an HTML5 Cordova project and I need to make a hook before compiling to convert entire projects folder (www) to ES5 before compiling. Is it possible? Structure cordova/ hooks/ node_modules/ platforms/ plugins/ www/...
asked by 09.08.2016 / 23:10
1
answer

Node.js Sequelize Error Relationships

Good afternoon guys, I'm new to Node.js and I'm having a problem. In this relationship, a Questionnaire can have MANY Questions, when I execute it in return I do not get the ID of Questionário in the Questão table, however the tw...
asked by 17.07.2015 / 17:14
1
answer

Change field unique collection mongodb

Good morning, I have a collection in mongodb with a unique:true field. I would like to change this field to false. If I change the code and delete the entire collection it works, but if I make the change in the code and do not dele...
asked by 27.02.2015 / 12:38
1
answer

Bind by position in SQL Server using Node JS (MSSQL)

I would like to know if you can bind the parameters by position instead of the name using mssql in NodeJS. Ex: //Por nome return pool.request() .input('input_parameter1', sql.Int, 10) .input('input_parameter2', sql.Int, 20) .query('select *...
asked by 01.11.2017 / 13:55
1
answer

Go through a method on all routes of all http methods except two

Basically I want to make all routes that come from any http method (get, post, put, ...) first pass by a method that will check if the user is authenticated, but this method should not be called when the user will authenticate (method POST...
asked by 02.06.2018 / 19:19
1
answer

How to run different Node.js sites on the same server?

I have a Linux server and on this server I have several hosted sites, each with its own folder and files. I want to start using Node.js to create the APIs for each site. What is the best way to do this? A process and port for each site or a s...
asked by 12.11.2016 / 14:36
1
answer

NodeJS because so many files

Good afternoon guys, I'm just getting started with NodeJS a project in VUEJS, and I saw that when I give the command NPM INSTALL It creates about 20,000 files, my application comes with 100mb with almost no dependency ... What is the...
asked by 18.09.2017 / 22:09
1
answer

How to make module configuration available correctly?

I'm creating a Node.js module and wanted to make use settings available. Let's say I wanted to provide a prefix for console.log just as an example: let opcoes = {}; function imprimir(texto) { console.log(opcoes.prefixo, texto)...
asked by 06.08.2018 / 15:52
1
answer

In Jade, how can I suppress the error if a variable does not exist?

I'm trying to create a form to create a user, but I use the same form to edit. When I try to create a new user the app shows me an error because in the form fields it tries to get information from a user that obviously does not exist because I a...
asked by 20.08.2015 / 16:53