Most voted "express" questions
Express is a minimum framework for Node.js web applications that provides a set of features for web and mobile applications.
Learn more…400 questions
Sort by count of
-
14
votes2
answers5459
viewsWhat are middleware in Nodejs?
What are middleware and how important it is for the Node platform?
-
10
votes1
answer361
viewsPassport Session authentication on Android
I have a web app running with Nodejs, Express and Passport-JS authentication, and everything works perfectly. Now I’m developing an Android app and need to authenticate my users using the same API.…
-
7
votes2
answers7184
viewsHow to set a token in the header?
Well I use jwt to generate a token only that the example I was following didn’t show exactly how to paste the token into the application header. Would anyone know how? Note: I am using the express.…
-
6
votes1
answer1320
viewsReceive parameter in delete request
I am trying to pass a parameter to my DELETE request, I tried to do the following: Use in the same way I use in GET (where it works normal). app.delete('/contatos', function(req, res){ var obj =…
-
5
votes1
answer711
viewsMulter file upload callback - Nodejs
Hello anyone ever used multer(express/nodejs module) to upload files? If so, how did you manage to capture the events of callbacks (onFileUploadStart and onFileUploadComplete)? Theoretically I am…
-
5
votes1
answer1429
viewsHow to use the Node Passport.js to login against the database
How to use Passport.js to control access using the express.js database and middleware. How to do login logic and how to know that the session is already authorized when the user has already logged…
-
5
votes2
answers419
viewsIs it possible to restrict access to variable information with Angularjs?
Hello, I am new to development and would like to know if there is any way to hide information from variables in Angularjs , I am using a Mongolab API and did not want to make my apiKey visible to…
-
4
votes2
answers888
viewsAre there BI/OLAP tools for the MEAN.JS platform?
Someone can indicate me a BI/ OLAP framework or at least a Chart Engine, preferably open-source, that integrates properly the platform MEAN.JS or MEAN IO architecturally SPA - Single Page…
angularjs node.js mongodb express business-intelligenceasked 10 years, 2 months ago Fernando Santucci 161 -
4
votes1
answer40
viewsIn Jade, how can I suppress the error if a variable does not exist?
I’m trying to create a form to create a user, but I use the same form to edit. When I try to create a new user the app shows me an error because in the form fields it tries to get information from a…
-
4
votes1
answer1056
viewsAjax POST with jQuery and Node.js Express always returning 404: Not Found
I created the route below to accept POST requests, but calls via AJAX to this route are always returning error 404: Not Found. /* Arquivo: integracoes.js */ var express = require('express'); var…
-
4
votes1
answer146
views -
4
votes1
answer951
viewsHow to run different Node.js sites on the same server?
I have a Linux server and on this server I have several hosted websites, each with its folder and files. I want to start using Node.js to create the API’s for each site. What’s the best way to do…
-
4
votes2
answers4742
viewsWhat is the "res.send()" command for in Express?
I am studying Nodejs for academic purposes and during the implementation of a project I came across this command. What it serves?
-
4
votes1
answer134
viewsPass a method on all routes of all http methods except two
Basically I want to make all the routes that come from any http method (get, post, put, ...) pass, first, by a method that will make the verification if the user is authenticated, however, this…
-
3
votes1
answer488
viewsCreate constants correctly with Mean.js (Node js)
I’m starting to study Mean.js and I was in doubt when the best way to create my application constants. I need to store some constants in the project to be accessible in various parts of the code.…
-
3
votes2
answers2832
viewsURL with string parameters with angular.js
I would like to know how to best treat url with parameters string angular.js. When accessed: www.app.net/nomeDaPessoa/ServicoDaPessoa Would respond to a certain route that is receiving the…
-
3
votes1
answer177
viewsBroadcast via an Express route
I have an endpoint in a Node application that when called should trigger a broadcast for the connected users in the Node application. That is, as soon as the user entered the system he would connect…
-
3
votes1
answer434
viewsUndefined Object
I’m having problems with an object on Node.Js with Express.Js. He is reporting the following error. Error: Route.get() requires callback functions but got a [object Undefined] at…
-
3
votes1
answer3127
viewsHow to find the Expressjs version?
How do I find the installed version of Expressjs?
-
3
votes1
answer663
viewsHow the Express Router function works
To use a middleware in Express, I do as the code below: var express = require('express'); var app = express(); app.use('/', function(req, res, next) { console.log('Middleware!'); }); However, I…
-
3
votes1
answer416
viewsSecurity when sending and taking data from a URL
Hello, I’m learning development and I don’t know much about security. I’m making a web application using Nodejs + Expressjs + AngularJs + MongoDB. I did it this way, Mongodb data is sent to a URL…
-
3
votes2
answers1523
viewsHow do asymmetric signatures work in JSON Webtokens (JWT)?
I recently started to study the possibility of starting to use JSON Webtokens in my projects, given their advantages. From what I understand, there is a symmetrical form and an asymmetric way of…
-
3
votes1
answer1698
viewsRoutes in separate files
How do I put routes in separate files? var express = require('express'); var App = express.Router(); var Notas = require('../api/notas'); App.route('/notas') .get(Notas.read) .post(Notas.create);…
-
3
votes1
answer1199
viewspass variables to EJS view of separate queries
I’m starting with Node/express etc. Create a website with the intention of learning and I’m in need of help. I have a mysql query that is sent to an EJS view via the code below: app.get('/',…
-
3
votes4
answers1986
viewsWhere does JWT keep the tokens?
I am following the following tutorial to create an authentication system using Node.js and JWT: https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens By following the steps of…
-
3
votes2
answers497
viewsHow to reload the page in Express / nodejs
I created a new project with Express and Nodejs, where I set a "/status" route. Each time this route is accessed, you must execute a routine in the script /routes/status.js. Example: If I run a F5…
-
3
votes1
answer408
viewsNodejs - How to use external variables in asynchronous functions
I’m starting to node and I still find the concept of asynchronous functions complicated. I am using and js to render templates to e-mail in my application. The prototype is: "use strict"; const…
-
3
votes1
answer4074
viewsWhat does Expressjs urlencoded mean in practice?
Analyzing a code built on the Nodejs platform, I came across the instruction express.urlencoded({ extended: false }), to try to understand it, I ended up using the Expressjs documentation, however I…
-
3
votes2
answers1634
viewsImage is not displayed when listed on Node Js
I am unable to list the saved images on and Ode with express, when I try to list my View does not display the image. My configuration file: module.exports = function(){ //recuperando a biblioteca do…
-
3
votes1
answer401
viewsEmpty input after submitting form
Hello, I am developing a login system, but I would like to improve something. When I register a user, and type his name, address, etc., and request the form, he returns all empty inputs. As in the…
-
3
votes1
answer210
viewsReturn a function to be executed - Typescript
I’m in a situation where I would like to generate an engine that runs an async function and that runs a successful callback on Ry and a catch error, and the responsibility of these callbacks is to…
-
3
votes1
answer341
viewsExpress with Typescript: "Element implicitly has an 'any' type"
I’m trying to dynamically generate my application routes with the Express.router() using Typescript and Node, but it doesn’t work and I’m not able to understand why. If anyone please knows what is…
-
3
votes2
answers4009
viewsHow to upload an image to the backend
I have an application in React that sends an image to the backend in Ode the problem is that I can’t get the file in express. I see you have a way to use the woman, only I don’t know how to get the…
-
3
votes3
answers1466
viewsTypeerror: Cannot read Property 'filename' of Undefined
I intend to store the file in the folder uploads and secure in the bank the name of the file. The console.log() show me this: {theBook: undefined, cover: undefined} Stores the image in the folder…
-
3
votes2
answers60
viewsExpress - Suggested experience, how to handle this type of code repetition
I’m studying the library (Express) and the language (Javascript), but this type of repetition below ends up bothering me and. I wonder what you would do in the situation to reduce the repetition of…
-
2
votes1
answer1082
viewsProblem with passing Nodejs/Express parameter
I am creating my first application in Nodejs and managed to structure the application, connection, directory structure, routes, in short, everything working right. Now, I went to implement the login…
-
2
votes1
answer338
viewsHow do N identify the path from the root of the request?
It’s like this: <link rel="stylesheet" href="http://localhost/node/softmon/css/style.css" type="css"> If I put it like that: <link rel="stylesheet" href="/css/style.css" type="css">…
-
2
votes1
answer44
viewsGenerate Json x Search in mongodb
I’m generating a Json. But I have the following situation: I have a record of contacts who may belong to the same company. I mean, I can have two people registered in a single company. How do I load…
-
2
votes1
answer1050
viewsNode.js - Function returning the query value?
It is the following I tried to search but I did not find any solution, to try to create a function in the model of my application that will return the data of the query in the database. This…
-
2
votes2
answers389
viewsAsynchronous server execution problem with Express, Mysql and Socket.IO
I am developing a Node.JS project with Express, Mysql and Socket.IO. When the user opens the main page provided by the server, the request must cause data to be read from the database and sent to…
-
2
votes1
answer250
viewsSend data to client without using an additional url
Hello. What I want to know is the best way to send data to the client and this data will be received through a function (which can be executed in a click). In the example below I will render a page…
-
2
votes1
answer772
viewsUser profiles for REST API access using Nodejs + ORM Sequelizejs
There is a way, or some cool package, to work with user profiles for access in certain endpoints of the REST API, as per each one’s permission? I am using Nodejs + Express + Sequelizejs as ORM.…
-
2
votes1
answer333
viewsGet size of a request
On my system, I receive several request, I wonder if there is a way to get the size of this request (req) received in kbs preferably, to get a sense of how much bandwidth was spent for that…
-
2
votes1
answer358
viewsList of values in a Session using Nodejs
I’m using the modules express-Session and express and I need to create a list of values in an item of a Session so that at some point I can add values to it. Ex: req.session.category = "Include key…
-
2
votes1
answer1006
viewsControllers and Routes in Node js
I wonder if it implies any difference between using only routes, or routes with controllers in the Node js, could someone give me some example of how to implement routes and controllers on Node…
-
2
votes1
answer674
viewsNode JS, Socket.IO Rooms and namespaces
I’m developing a map-based android app, which will create chat rooms in some predetermined places and places where users need them. I did some research with mechanisms that I could use in my…
-
2
votes1
answer2790
viewsNode.js and Express - Typeerror: Cannot read Property
I’m getting the following console error: Typeerror: Cannot read Property '_id' of Undefined I’m reading the book "Mean Full Stack Javascript..." from the code house. During the development of the…
-
2
votes1
answer653
viewsCatch Querystring with Nodejs
I need to pick up the QueryString which is being passed to the server created on Nodejs. I’ve tried several ways but I can’t get the parameters of and Ph. I’m a beginner at Nodejs and the code I…
-
2
votes0
answers377
viewsNodejs application startup problem in UOL Hosting
Galley, I have my application running 100% on my local machine, but when I upload the files to my Node hosting on UOL HOST it doesn’t work on startup. I am using the same version of UOL Node…
-
2
votes1
answer956
viewsWhy and when to use "res.send()" in an application? Nodejs and Express
Well, I’m a beginner in Nodejs and started studying for academic purposes. In another question I asked here at SO-BR (What is the "res.send()" command for in Express?) I asked what this command was…