Questions tagged as 'express'

0
answers

Session in Node.JS

I was reading that middleware Express Session is not ideal for working in production, for which archives the sessions in memory. I've also read that storing session data in memory is not a good practice. So, my question is: what is the be...
asked by 25.03.2018 / 17:32
0
answers

Error creating a table with sequelize "TypeError: Can not read property 'sequelize' of undefined"

I'm having the following error when trying to create a table:    const User = app.db.sequelize.define ('user', {       TypeError: Can not read property 'sequelize' of undefined My folder structure: Myconfigurationfile(server.js)mo...
asked by 06.02.2018 / 15:50
0
answers

How to organize an Express.js application

Given that the expression has no built-in "autoload" functionality, what would be the best structure or boilerplate to follow in a large monolithic project? and how do you create it?     
asked by 11.12.2017 / 16:01
0
answers

Express.js check if requisition is made by iframe

How to check if the request is made by iframe in "express.js" ? Example: site A: <iframe src="http://siteb.com/router"> site B: app.get('/router', (req, res, next) => // logica... }) The question is not t...
asked by 06.12.2017 / 20:59
1
answer

List items of an object in the JS Pug, with Node and Mongo

I'm setting up a store, using Keystone JS, I installed the Pug JS and MongoDB dependencies. I created a model that is pointing to a view, called Tour.JS The problem is that I could not efficiently list all the items that are in the MongoDB...
asked by 01.11.2017 / 03:19
1
answer

When I use Express.js and Angular? (using Node.js)

Hello, good evening guys, I started to study Node.JS about 2 weeks ago, and I am in doubt about these 2 frameworks, because in the video lessons I was initially seeing about Node.Js, the boy only used Express as Framework. But everywhere I look I...
asked by 14.10.2017 / 06:54
1
answer

Redirect passport giving error with express 4

I'm having problems after user authentication in form. The passport redirects to the root again, however it does not pass to the GET of the '/' route expression and displays [object Object]. If you use servidor.use(function(err, req, res, n...
asked by 10.10.2017 / 17:13
1
answer

Middleware Manipulation

I'm trying to do the following handling in ExpressJS. I picked up a MEAN Stack project and the person I was developing came out and I'm just continuing. But now I came across the following situation: When I make 2 requests in mongoDB to li...
asked by 14.09.2017 / 19:19
0
answers

Web Service for multiple databases [closed]

I'm starting with Node.js and was wondering if anyone could give me strength in the matter of making a Web Service for multiple databases. I already have a code developed for MySQL, I need to implement the same code for the Sql Server and Sql...
asked by 11.09.2017 / 14:39
0
answers

Post-Payload Error (Node.js)

Today when I was performing the post from a larger base 64 is returning this from my server. When uploading a smaller image it sends without problems, I tried to use some solutions limiting the server to 50mb but it did not work. server.use(bo...
asked by 31.08.2017 / 19:45