Questions tagged as 'nodejs'

0
answers

Nodejs problem when uploading image to the server with 'formidable'

Hi, I'm trying to upload a file, in my case it will mostly be an image or images in a director of my backend made in nodejs, then I leave the code of the function that subverts the image with formidable : router.post('/uploadImage', (request...
asked by 10.12.2018 / 16:00
1
answer

How to save from an angular form to a server nodejs an image

I'm doing a web page with angle and nodejs , I want the workers that register have the option to save a profile picture, then I have a form of angular (ngForm) and such and I have put an input file for the upload, up there well. On the fr...
asked by 05.12.2018 / 21:23
0
answers

Error posting nodejs app to heruko (internal / modules / cjs / loader.js: 582 ... throw err; ... Error: Can not find module '../constants')

I have the following problem: I have an api in nodeJS V10.14, I'm hosting it in heroku, at first everything was fine, but a day ago I deployed and gave me the following error (heroku log): in the index.js file I have the following....
asked by 05.12.2018 / 04:29
0
answers

Error creating a Schema with a field of type file in NodeJs

const mongoose = require('mongoose'); const {Schema} = mongoose; const empleado_schema = new Schema({ dni:{type:String,required:true, unique:true}, nombre:{type:String, required:true}, apellidos:{type:String, required:true},...
asked by 03.12.2018 / 19:51
1
answer

Angular + Nodejs error CORS

employees-create.component.ts import { Component, OnInit } from '@angular/core'; import { Empleado } from '../modelo-de-datos/empleados'; import { NgForm } from '@angular/forms'; import { EmpleadoServiceService } from '../servicios/empleado-...
asked by 30.11.2018 / 15:13
0
answers

Send parameters nodemailer, email-template-v2, hbs.

I'm using nodemailer to send emails, and email-template-v2 to send an HTML format, my purpose is to send some variables as a reference, payment and currency by email, but I really do not know how, I did not like to show it in my template .hbs, i...
asked by 27.11.2018 / 05:15
1
answer

Promises with NodeJS

I have an array of stores which by promises I try to obtain the schedule of each, but in some cases I get the following error:    UnhandledPromiseRejectionWarning: TypeError: Can not read property   'length' of undefined       at control_home...
asked by 26.11.2018 / 04:34
0
answers

BAD REQUEST PAYPAL and NODEJS

Good morning I have a bad request error in the PayPal SDK this is the json of the payment; var create_payment_json = { intent: "sale", payer: { payment_method: "paypal" }, redirect_urls: { return_url: "http://lo...
asked by 23.11.2018 / 18:14
0
answers

Pass parameters from a res.render

Good morning I need to pass parameters to my an Express app.get function from a res.render. The truth is the first time that occurs to me and I have no idea how to do it. In this line of code should pass a parameter; 'res.render("usuarios",...
asked by 22.11.2018 / 19:23
1
answer

query in mongoDB with json nested

good morning. I have the following collection in mongoDb: { "signupDate": "2018-11-22T19:14:02.047Z", "_id": "5bf700269e5b59276885eda5", "userName": "pruebas", "email": "[email protected]", "password": "abc1234", "interests": "{\"followEmai...
asked by 23.11.2018 / 16:50