Questions tagged as 'express'

1
answer

How to query collections with mongoose embedded fields?

learning mongoose and mongoDB I have an inconvenience that I do not know how to solve, with the following code: var mongoose = require('mongoose'); var mongooseEsquema = new mongoose.Schema({ nombre: {type: String}, apellido : {type:...
asked by 12.06.2018 / 00:28
0
answers

Paginate is not a function

Partners help me! I want to paginate the results of my Artist model extracted from mongoDB but the following error appears: Artist.find(...).sort(...).paginate is not a function This is my model const mongoose = require('mongoose'); cons...
asked by 05.06.2018 / 07:12
0
answers

Debugge in Visual Studio Code

I created a simple application in node.js var app = require("express"); var express = express(); app.get("/", function(req, res){ res.send("Hello"); }); app.listen(3000); and the launch.json file: { "version": "0.2.0", "configu...
asked by 22.05.2018 / 16:06
0
answers

Express app using firebase functions

I'm setting up an express app in firebase functions The application is running correctly in the next url    link But I want to make it run in this url, just like in the official Firebase tutotial on youtube    link What am I...
asked by 21.05.2018 / 06:03
0
answers

headers in express, how to get them

I need to get headers from different web pages by using node technology and more specifically express, so I've seen printing the req.headers (using the req module) they get all. But the doubt comes in that by checking what returns to me there...
asked by 14.05.2018 / 18:15
1
answer

I close the node terminal by mistake in the angle service create

When I save something to the bd (MongoDB) from the app, I close the node server in the terminal, however it saves the data. I have in the file api_v1.js: const express = require('express'); const router = express.Router(); const Profesor =...
asked by 06.05.2018 / 01:56
1
answer

does anyone know how I can integrate Bootstrap to nodejs with Express?

I am developing an application using nodejs and the Express framework. I want to add Bootstrap to my project in local mode. I added this to my index (having already downloaded Bootstrap) <script language = "javascript" src = "- / node...
asked by 23.04.2018 / 04:46
1
answer

How can I export / import const app = express () to another file js

I am trying to separate responsibilities, sharing in different files and modules the different actions that I will carry out in my application on the server side. I came across a problem, which I can not understand. I try to export from the f...
asked by 28.03.2018 / 01:23
1
answer

DELETE Not Found with Postman in APIREST NodeJs with Mongo and Mongosoe

How about classmates? I'm working on an api rest with NodeJs, MongoDB and Mongoose, but when implementing DELETE by Id, the postman sends me an error      Cannont DELETE /api/product/5aae8f9df40f3924a4b984f In the status of the Postman sends a 4...
asked by 18.03.2018 / 21:24
1
answer

PassportJS + Express with Node.js, req.session.passport Undefined

I am new with this framework and I was trying to do a 'Registration and Login' test with PassportJS + Express + Node.js + MongoDB and Redis. The registry works perfectly and apparently the login also, the problem is that when logging in I want t...
asked by 21.02.2018 / 05:05