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
-
0
votes1
answer1758
viewsQuery parameterized with Node.js and knex.js
In the code below I make a query and bring the contracts that are concluded or not, according to the parameter concluido (0 or 1). How do I bring this consultation all contracts when the parameter…
-
0
votes2
answers113
viewshow to direct a page synchronously at nodejs
good afternoon I own a page called index.js in the route folder of the express nodejs. when the pendingAprovals page is called I would like the index to call a webservice to send a JSON to the…
-
0
votes0
answers21
viewsConnection cluster for MS SQL Server
I need to create a Connection Cluster for MS SQL Server. Here’s an example I performed in Mysql: var mysql = require('mysql'); var db_cluster_config = require('./dbMysqlUtils').cluster_config; var…
-
0
votes0
answers83
viewsPage is not rendering
I am configuring a web application using Keystone JS. I set up some Routes, and views, and also already set up a "virtual store" structure to add and exlcuir sightseeing tours. The problem, that due…
-
0
votes0
answers26
viewsIs there an environment for Nodejs cloud development?
Study at a college that has not yet homologous nodejs in the equipment. However, where can I find a cloud environment to develop my nodejs and Expression applications ?
-
0
votes0
answers35
viewsExpress.js check if request is made by iframe
How to check if request is made by iframe in "express js."? Example: WEBSITE TO: <iframe src="http://siteb.com/router"> site B: app.get('/router', (req, res, next) => // logica... }) The…
-
0
votes1
answer204
viewsApplication . NET C# Nodejs express style
But for a few features I would like my project to respond to some simple HTTP Rest requests. As the project will handle COM+ and more, I will do it in C#. The point is, I don’t want to have to deal…
-
0
votes0
answers142
viewsSyntaxerror: Unexpected token (244:78) - Nodejs, Express, jade, mysql
I am developing a program and out of nowhere in creating a simple page appeared error below: The program is working everything but this page that appears this error: I’ve gone over all the lines and…
-
0
votes1
answer813
viewsProblem loading static files on routes with nodejs / expressJS
Programming my first system I came across a little problem... I am creating a client system and changed the structure of the views folder as follows: /app /views /customers ejs customers. add ejs.…
-
0
votes1
answer65
viewsCan Expressjs be used in production?
I recently saw a course where Expressjs was used for backend testing in JSON for an application and I was amazed, but I came up with several questions: Could it be used in production? Can the most…
-
0
votes1
answer526
viewsSetar localStorage in different Omains
I have three applications: 1. Login (which runs on door 8080) with jQuery very simple 2. API (wheel at port 4000) with Nodejs 3. Web (rotating at port 4200) with Angular When I am logged in and…
-
0
votes1
answer893
viewsNode JS and Mongodb - Return data from a model to a route
I’m new to Node JS + Mongodb and I’ve had a doubt for a couple of days that I couldn’t figure out how to solve it. My problem is this: I have a file of routes that make a call to a model, as in the…
-
0
votes1
answer73
viewsTCP Server + Web Server in the same application
Next guys, I have some ideas for a project and I’m having some questions ... 1º Is it possible to create a TCP Server that will handle the connection with the Client along with a Web Server using…
-
0
votes1
answer329
viewsHow to show data in ascending order mongoosejs + expressjs
Can you help me? I am trying to show my Database records in ascending order, but it is an object within another and I want to organize by cashout follows the photo of my DB. I am using the Mongoose…
-
0
votes1
answer199
viewsHow to bring an image of a website in the Node API request?
I’m making an application and wanted after giving a request, that the API bring an image of this website as an answer. For example, in giving error 404, I would like you to bring that. How can I do?…
-
0
votes0
answers378
viewsPull images in HTML with Node Js + Express
Guys I’m starting with the nodejs and I have a question. Whenever I call ima image or even the bootstrap in my file I have to use sendfile. Whenever u by an icon or image I will have to set the…
-
0
votes1
answer166
viewsI am unable to edit in CRUD - Nodejs + Express + Mongodb
next: I literally started working with Nodejs + Express + Mongodb today and as an exercise I started with the famous CRUD (Create, Read, Update, Delete). I managed to do almost everything except the…
-
0
votes1
answer372
viewsNumber of consultations held Nodejs
I would like to know the best way to get the number of requests made to a nodejs server since the last Restart. For example: Admin: Node index.js User: 127.0.0.1:3000/all User2: 127.0.0.1:3000/all…
-
0
votes1
answer20
viewsHandle object in Node via bank return
I’m assembling an object according to the values returned by the database. Actually, I’m doing it this way: let games; execSQLQuery(query, form_values) .then(dbResponse => { if (dbResponse != "")…
-
0
votes2
answers98
viewsCreate a controller to make a GET type request
I am creating a simple API with Ode that I do a news post, in this I am using express to create my routes of my application, I have already managed to create a controller that posts my news, but I…
-
0
votes2
answers524
viewsMy localhost connection is taking too long
I created a Nodejs server with express but when I try to access http://localhost:3000 the page never loads, is loading only. const http = require('http') const express = require('express')…
-
0
votes1
answer137
viewsViews not loading express/Node.js
I created a shirt folder inside the Views folder, and when directing the ejs file to be opened 'Marvel.ejs' it cannot find. Only finds if I put Marvel.ejs inside the Views folder and in no…
-
0
votes1
answer78
viewsGet data stops with Node.JS
I’m trying to get information sent via POST in Node.JS, thus: I call the API that: $.ajax({ method: 'POST', url: '/api/post', data: { xml: '<?xml version="1.0"?><query><author>John…
-
0
votes1
answer276
viewsAllow requests only for a specific Nodejs route?
I’m trying to create an API gateway, which is going really well. However, when trying to get a microservice to accept ONLY requests through the gateway, I am having trouble. I want any external…
-
0
votes0
answers51
viewsProblem installing flash package from express via npm
I’m having trouble installing middleware packages flash express. I can’t install any of the packages, either flash, connect-flash or express-flash present the following error at the prompt: Someone…
-
0
votes1
answer110
viewsfind no req.body using populate
Controller async index(req, res) { const avali = await Avaliacao.find(req.body) .populate('Time').exec((time, err) => { console.log(`Para retorna tudo ${time}`) }) return res.send(avali) }, Model…
-
0
votes1
answer524
viewsSynchronous function to check files in Nodejs?
I am creating PDF’s on my Nodejs server using the Express framework and the Pdfmake library. If anyone looks at my profile they will see that I asked a question about corrupted PDF after…
-
0
votes1
answer693
viewsSend the contents of a front-end function via POST to Node
Hello, I would like to know how to send a variable within a function via the POST method from the front end to the back end, and receive the value on the POST Express route? In the Frond-end…
-
0
votes0
answers26
viewsPage with parameter not rendering CSS
Hi, I have a problem rendering my page. When I do a route with parameter in the URL the bootstrap css simply does not render, however, if I do a route that does not have any parameter in the url the…
-
0
votes0
answers48
viewsData +upload Images doubling in nodejs!
I’m starting now with Nodejs, and I’m testing an example that saves data along with an upload of images. It’s working, but the image is duplicated. I wish I knew where the mistake was and why: var…
-
0
votes1
answer46
viewsSubroutes in Node JS
I have the following doubt. I have two GET routes, and the second route, whenever I try to access, the browser understands as if I were informing the parameter :id and creates an error.…
-
0
votes1
answer24
viewsHow to make changes on a usurious registered with the PUT method?
Hello I am learning Java, now in the back end I have set up a user registration API Email,Name,Age,Phone. I used the POST method to insert the new user in the array and GET to show the users, so far…
-
0
votes1
answer931
viewsHow to send information from an html form to a route? - Nodejs
I am a beginner in Nodejs and am responsible for a project in this tool. I am using the "EJS" engine to create the views. I created a form, to send the information typed by the user, for a route and…
-
0
votes1
answer244
viewsWhat is the best/most efficient way to send data from a view to a route using Nodejs and Express?
I am a beginner in Nodejs and am responsible for a project in this tool. I am using the "EJS" engine to create the views. I created a form to send the information entered by the user to a route, on…
-
0
votes0
answers697
viewsError: ORA-01461: can bind a LONG value only for Insert into a LONG column
I’m getting this error on Oracle. Error: ORA-01461: can bind a LONG value only for Insert into a LONG column When executing the code below that the error is presented, I would like to know how to…
-
0
votes1
answer2377
viewsProblem picking query params in URL by Express
I’m creating a route GET which returns an item from a user array, but has no return when used req.query.id. When I use req.params.id right, but in that case I want to test for query string even.…
-
0
votes1
answer22
viewsError whenever I use Omit
I always have a mistake that covers the Omit. It doesn’t stop running the code, but it keeps dialing the vscode and it bothers me. constructor( { buyPrice, code, description, lovers, sellPrice, tags…
-
0
votes0
answers109
viewsMysql module running wrong script - Node Js
I am developing a simple system of customer persistence, products and sale. I have made a API using the express and module Mysql, but something strange is happening and I really have no idea what it…
-
0
votes1
answer29
viewsEditing images on a crud
I have a CRUD of products which has the name, price, description and 4 images for each. Adding, viewing and deleting I’ve already been able to do. But the issue of editing is catching me on account…
-
0
votes0
answers51
viewsControl of trolley products
Good morning! I’m making a system where the user chooses the products (where there is only 1 unit of each) and he puts these products in the cart. I need to control this cart for a certain time,…
-
0
votes0
answers20
viewsStart http server inside Electron
I wonder if it is possible to start a Rest server within the Electron. I need that while the application is open it is possible to access an http route.
-
0
votes1
answer285
viewsHow to use Datatable Plugin (Jquery) with Node.js
I am working with Node and express and need to fill a table with information that comes from an SQL Database. I run my get code from the page that way: app.get('/Home.ejs', (req, resp) => {…
-
0
votes1
answer742
viewsgenerates error Can’t set headers after they are sent,is running 2 times
He’s running the contents of the validator 2 times, I’m new to Node.js and I don’t know what’s going on. When Validator returns an error to API for, when I have no return of an error the api works…
-
0
votes0
answers34
viewsError validation with Yup
Good evening. I’m trying to perform an error validation with Yup on an API. However I cannot show the error to the end user, as VS Code informs me that the path is Undefined. Follows the code.…
-
0
votes1
answer132
viewsError: Most Middleware in app nodejs
Running application nodejs. got this error: I ran my application with the command Node app.js Versions: Date of publication: 8.9.2 npm: 5.5.1 express: 4.15.5 Code app.js: /** * Module dependencies.…
-
0
votes1
answer1379
views'Can’t set headers after they are sent. ' Express.js
I’m trying to send the variable 'name' to the client-side, but it’s only working when I run a respons.end() when I use two, returns this error: > 'Can't set headers after they are sent.' Server…
-
0
votes0
answers1590
viewsError Cannot read Property ' toString ' of Undefined
I am creating an application making use of Express, but I’m facing that mistake : ➜ Futiba git:(master) ✗ node index.js ➜ [ Server ] Online…
-
0
votes1
answer30
viewsHow to pass a JSON to the Express front end
Hello! I was wondering if there’s any way I can get a JSON file to the Front End using Express... I’m using this method: app.use(express.static(__dirname + '/public')); app.get("/", (req, res) =>…
-
0
votes1
answer868
viewsRequest Application/PDF generating file with wrong information[Angularjs+Nodejs]
I have an Angularjs+Node(Express) application totally Restless. The back end only serves to validate requests and route to other applications, holders of business rules. At some point, my front…
-
0
votes1
answer839
views