Questions tagged as 'express'

4
answers

error install express

I have this problem, every time I try to install express in windows 10 with the command npm install express or npm install express-generator I get this error: npm WARN enoent ENOENT: no such file or directory, open 'C:\Users...
asked by 25.05.2017 / 15:08
2
answers

Export class with express

I currently work full scripts for example: function comprobar(){ console.log('aqui el codigo'); } exports.permitir = comprobar; and I need to work with classes, something like this: class Comprobador { function comprobar() { consol...
asked by 25.01.2018 / 21:01
1
answer

Problems with res.sendFile () express 4.14 Node.js 4.2

Good morning. I've been wrong for a couple of days. I'll let you know in case someone knows why it happens. I have a project AngularJS v1.5.11 + Node.js v4.2.6 (with express v4.14.1 ) and when I raise it with node serv...
asked by 08.02.2017 / 17:51
1
answer

Monitor App on Angular 6 and Nodejs API [closed]

I have designed a Web with Angular 6 and a back-end with Express and NodeJS. I have the idea of a dashboard to monitor the number of visits, how many queries to the API perform, events click on the front ... I'm lost and I'm not sure where...
asked by 13.12.2018 / 20:55
1
answer

Export variables from the Node JS server script

I'm trying to export a variable from my script (Server.js) to another script (articleHandler.js) using the following code line in the server script module.exports = myVariable; Which has not given me any success, since when ex...
asked by 14.10.2018 / 07:26
1
answer

Example of project with create-react-app react-router-dom and expressjs

I have a project with create-react-app where I do all project routes with react-router-dom (since the examples with react-router are no longer updated). I need to use data from a DB in MSSQL and I am using superagent to fetch the data using url...
asked by 03.11.2017 / 22:47
3
answers

Using findOne () and findOneById with HTTP requests (Nodejs + mongoose)

I'm doing a api rest where I want to do HTTP requests using Postman, specifically I want to do a search or update a mongodb document, but this must be by an id that is not the doc_id that mongo provides. Basically what I need is for someone t...
asked by 14.04.2017 / 20:27
1
answer

Modify a field of all documents

Greetings, I have a question about the update method. TablaPTC.update({compGasto:"si"},{$set: {acumulado: "0"}}); Currently this is my method, and I'm not sure I have to change it to serve.     
asked by 17.01.2017 / 04:54
1
answer

Problem with public file in express

I have a problem I can not make the CSS file apply in the HTML This is my index.js const express = require("express"); const app = express(); const morgan = require("morgan"); const path = require("path"); //ROUTES app.use(require("./r...
asked by 22.12.2018 / 17:26
2
answers

How to get a POST PUT DELETE in express with postman

I leave the code in js that I use I would need POST PUT AND DELETE! Thanks in advance. My problem is that I do not know how to take the data and work with them. I need to make a get of only computers. Add products with post. To be able to...
asked by 24.10.2018 / 19:53