Questions tagged as 'express'

1
answer

Upload data and images of a form with Node.js - form / data

I am developing a web page in which in one of its sections the user must register a product (DATA) and upload an image (optional) concerning it. When you click on the "Save" button you should upload the image to the server, register the data in...
asked by 24.10.2018 / 04:20
1
answer

Fail to Reconnect Mysql in NodeJS

Good morning I have the following service to manage connections to mysql var mysqlService = require( 'mysql' ); import { config } from '../../config'; var connection; function handleDisconnect() { connection = mysqlService.create...
asked by 11.04.2018 / 11:00
1
answer

Do find using the result of another find (which returns multiple objects)

What I want to do is with the result of a find (which returns several objects to me), again doing a find in DB looking for all the records that have the id of the records that I got in the previous find (taking into account note that they are mu...
asked by 08.03.2018 / 03:58
1
answer

How do I implement Passport in angular 2.0 and nodeJs?

I ask this question, because I already made some application with authentication with these technologies: MongoDb, Angular, NodeJs and Express. The fact is that I have been researching about Passport, but I can not implement it in nodeJs at all,...
asked by 22.08.2017 / 16:19
1
answer

Use of mustache-express4

I'm a novice with express and mustache , but I do not understand the error: index.js const join = require( 'path' ).join; const EX = require( 'express' ); const MiniModule = require( './mini' ); var app = EX( ); app.en...
asked by 15.04.2017 / 12:11
1
answer

how to pass variable from nodejs (Expressjs) to javascript (client side)

I have this fragment of code in nodejs app.get('/consul', function(req, res, next) { // res.render('c_pUser', { title: conUsers}); }); the title variable I want to pass it to javascript on the client side try to show it in javasc...
asked by 04.12.2016 / 14:17
1
answer

How to show the result of a javascript operation to jade

The goal is to obtain the data of an operation javascript and show the result on the page, the code is as follows: doctype html html head title Mi Pagina script(type="text/javascript"). var resultado = localStorage.getItem("val...
asked by 06.07.2016 / 19:00
1
answer

Module connect-flash does not work

How about? I am working on a project which I need to pass messages from the server to the client, and I have decided to use the Connect-Flash module. But when the message is passed, the client does not show it. (I'm using the EJS template engine...
asked by 16.09.2018 / 22:11
0
answers

Subqueries in mongoose

I have a problem when making subqueries in mongoose, I have two collections one place and another material , the place collection has an array of materials ids added by a user . Now what I'm trying to do is to be able to update a plac...
asked by 16.08.2018 / 21:02
1
answer

Problems showing queries result in express + mongodb

Hi, I am trying to make an API that, given some ids, returns an array with each object found. The problem is that the app breaks when I consult the api as shown below. I would like someone to help me with what is happening as I am new with node....
asked by 04.05.2018 / 17:42