Questions tagged as 'express'

1
answer

Read line to file line .txt

I'm trying to read a .txt file from 3.5GB line-by-line and save in the db mongo. Columns use the "|" tab. and I'm using Node js with Express. I did the test with a file smaller than 43 lines and everything worked fine but with the largest file I...
asked by 17.06.2017 / 22:13
1
answer

Defining default values to vary with the Pug Engine Template

I'm starting to work with MEAN and use the Pug template engine. I know the same was Jade previously and there have been updates on how to work with it. My problem is that in Jade, and in various places on the internet, I have the informatio...
asked by 20.01.2017 / 02:42
1
answer

How to include a regex in the parameters of an Express route?

In a project I'm doing I want to point a specific route to a controller. In a simple case of a route with parameters I would do so: app.get('/:lang/:activities/:activity', require('./routes/activities')); But in this specific case the ac...
asked by 28.05.2016 / 16:19
1
answer

Route configuration error on NodeJS with Express [duplicate]

I have a problem when starting NodeJS, similar to this post this link but did not have more feedback from those who asked and the solution presented in the answer did not help me either. The example is from a book, from Code House, and ar...
asked by 11.01.2016 / 20:52
1
answer

Error sharing HTTP session with socket.io. io.sets "is not valid".

I'm applying step by step the book "Node.js, real-time applications" by Caio Ribeiro Pereira. All right up to the share of express-session from HTTP to socket.io. As far as I can see there is nothing wrong, but when I try to connect the serve...
asked by 21.01.2015 / 02:55
1
answer

How to edit page after rendered with Node.js? [closed]

I need every time a page is rendered with any path to be added one paragraph after <body> and another paragraph before </body> . I'm using Express.js and to do this by taking the string return from app.render a...
asked by 14.01.2015 / 23:12
1
answer

Uploading multiple files with Node.js

I'm trying to upload multiple files with Node.js, but I can not do the server part. I'm using ExpressJS as a framework, and if need be I can use other packages to facilitate this task. For the time being, I'm using express.bodyParser()...
asked by 16.06.2014 / 20:17
1
answer

The route does not run when you call after PayPal checkout

The successful route is not activated after the PayPal checkout that redirects to / success PS: My view is in react. This is the part that is not being called when access / success app.get('/success', (req, res) => { const payerId...
asked by 27.12.2018 / 14:47
1
answer

NodeJS - TypeError: Can not read property 'get' of undefined

I'm a beginner in NodeJs and I came across this problem when I was exporting a module: "TypeError: Can not read property 'get' of undefined" . I did not understand why it gave the error since the code is identical to the one of the course teach...
asked by 17.12.2018 / 17:43
0
answers

req.body returning undefined when I use consign in the application

I am familiarizing with the expression, so I created a simple Form with two fields, I have a JS file where I get the data from the form and send it through xmlHttpRequest and on the server side, I'm using consign to manage my routes, prob...
asked by 24.12.2018 / 01:57