Questions tagged as 'node.js'

0
answers

Node to import data after a certain time

I'm importing data from an API with Node. Implemented everything with async and await and fetch to return the data and iteration with for of. I use pm2 to run the server remembering that it's all local. So far so good it imports up to abou...
asked by 30.05.2018 / 13:33
0
answers

TestsNodejs - deprecation compilers in mocha and babel

I'm creating an api on the node and testing using mocha, chai and the transpiler and babel I've changed --compilers js:babel-core/register for --require babel-core/register As written in the mocha documentation link Well, I ch...
asked by 02.06.2018 / 09:22
0
answers

Combobox selects State and city search in MySQL

I need to solve this part, my intention is to select the state in the combobox the query below recognize the selected acronym and query in MySQL. function BuscaDAO(connection){ this._connection = connection; } BuscaDAO.prototype.getBusca...
asked by 27.05.2018 / 03:32
0
answers

Doubt with socket.emit

I have the following code in a small notification application that I'm doing. var express = require('express') , app = express() , server = require('http').createServer(app).listen(4555) , io = require('socket.io').listen(server) , bodyParser...
asked by 30.05.2018 / 19:55
1
answer

Access one module from another

Well, I'm learning how to implement MVC with the Express framework, but I came across the following situation in my app.js file: var express = require('express'); var consign = require('consign'); var bodyParser = require('body-parser'); var...
asked by 22.05.2018 / 15:31
0
answers

Error in implementing image upload on Node Express

Please see the code below function uploadImage(req, res) { var userId = req.params.id; var file_name = 'No limite...'; if (req.files) { var file_path = req.files.image.path; var file_split = file_path.split('\');...
asked by 21.05.2018 / 17:29
0
answers

Display a list of users using mongodb using node.js and HTML

Hello, I'm trying to create a method to display a user from a list of users from my database. Below I show how I insert each new user (working). First the index.js var mongoose = require('mongoose'); var express = require('express'); var rou...
asked by 21.05.2018 / 19:38
0
answers

Problem in logic for implementing authentication with Node Express

The people in this group forgive me if the explanation is a little long and meaningless, it's because I'm taking an online course from udemy and the teacher takes a lot to answer so I'll take a step by step from what I'm doing. At first I can sa...
asked by 22.05.2018 / 11:59
0
answers

PHP call nodejs from another server

I have a PHP application that runs on a server. Now, this application needs some data that is generated by a nodejs script that stays on another server. Is it possible through PHP to call this script on another server, pass parameters and wai...
asked by 18.05.2018 / 16:17
1
answer

Module not found: Can not resolve 'assets / css / custom.css'

I have a small problem when starting my project in react, when running the command yarn start the terminal returns me the following error ./src/index.js Module not found: Can't resolve 'assets/css/custom.css' But in my index.js it's like th...
asked by 14.05.2018 / 22:13