Questions tagged as 'express'

1
answer

Problem to access elements of a document: mongoose

I want to do a password verification using express and mongoose. All right until the part where I check the password, I just can not access that value of my document. This is my function: function iniciar_sesion(req, res) { let usu = n...
asked by 26.12.2016 / 21:01
1
answer

Failed to lookup view "home" in view directory using handlebars

Hi, I'm using node with express and handlebars but when I try to render the view, the error mentioned appears.    Error: Failed to lookup view "home" in views directory   "/ home / joaquin / workspace / nodejs / EasyRcu / views" at   EventEmi...
asked by 18.10.2016 / 15:09
0
answers

localhost redirected to an external ip EXPRESSJS

When I enter localhost: 3000 in chromium redirects me to google.es and I can not avoid this behavior, I have investigated what can be caused and I do not give with a solution. In mozilla it does not happen to me. My system is ubuntu 18.04, I...
asked by 30.12.2018 / 23:14
1
answer

Problem when I want to make a post or get of users

I am working on a project with Javascript, Node.js and Express. I'm trying to do all the user logic but for some reason it does not want to work. The error that postman throws at me is this: <!DOCTYPE html> <html lang="en"> <...
asked by 23.12.2018 / 03:29
0
answers

Problem with express route

This is my server: const express = require('express'); const morgan = require('morgan'); const app = express(); const { mongoose } = require('./database'); // Settings app.set('port', process.env.PORT || 3000); var port = app.get('port'); /...
asked by 23.12.2018 / 01:55
1
answer

Search for an element in a MongoDB database using Nodejs

Alright, here I have a code where I have my Express server, the connection to the database and apparently everything works fine. const express = require('express'); const path = require('path'); const cookieParser = require('cookie-parser'); c...
asked by 22.12.2018 / 19:53
1
answer

Mongodb error: $ in needs an array

I am modifying the delete function in a crud. Originally taskID was a single ID to be deleted; while in my program it is an array of multiple IDs. I do not know what the line of code with mongodb or mongoose would be like to eliminate all the ta...
asked by 04.01.2019 / 05:08
0
answers

I can not update mongodb from Mongose

I try to add data to my Array by mongose but nothing happens, in the DB continuous same, I can not change it. Model Dao DB    No matter how many times you run, it does not change, it is no...
asked by 10.12.2018 / 05:38
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