ExpressRoute is a service that enables you to create private connections between Azure datacenters and infrastructure that's on your premises or in a colocation environment.
Questions tagged [express-router]
265 questions
0
votes
2 answers
How to show custom message of route not found in expressjs?
I used this code at the bottom of app.js
app.use(function (req, res) {
res.send('Route Not Found');
})
But it executes in every request. I want to execute it only when route is not found.

Mahfuz
- 9
- 1
- 6
0
votes
1 answer
express router optional extensions
I have a route built up like this in different files.
I need one of the routes to respond to all of these extensions (including no extension):
/api/sitemap
/api/sitemap.xml
/api/sitemap.html
/api/sitemap.json
my unmounted route definition for the…

LongHike
- 4,016
- 4
- 37
- 76
0
votes
1 answer
About endpoint of AAD on ER environment
I would like to know about the access route to AAD on ExpressRoute.
What's new in Azure Active Directory?
https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/whats-new#expressroute-support-changes
May 2018
ExpressRoute support…

Yuuji Kanamori
- 1
- 1
0
votes
1 answer
Using Service in Express Router
I am pretty new in the NodeJS but I would like to learn something new. I came from .NET fancy dependency injection, inversion of controll, microservice shiny world so I am trying write some service in TypeScript based on my previous experiences.
I…

Ondřej Sýkora
- 73
- 1
- 6
0
votes
1 answer
Material not working using express routing
I am using angular/material in my angular-cli application it works
fine but i have implemented 2 bootstrap theme for each panels (front
end and client portals) when i use client portal saperately material
works fine but when i redirect from…

Mohammad Zeeshan
- 825
- 1
- 9
- 20
0
votes
1 answer
Express route returning 404 error
The express route in my node app is returning a 404 error. It works locally but on the production server it returns a 404 error (bear in mind that I changed the AJAX url to the one on my production server before uploading). My code:
server.js:
const…

Jason Ellis
- 526
- 8
- 15
0
votes
1 answer
Bootstrap theme's assets management in node.js project with express routes
I'm from PHP background and using bootstrap framework for a while, currently working on a Node.js and express with routes project. I'm facing difficulty understanding how to call project assets (js, css, images etc) in views (index.html).
Used to…

Mohammed Moinuddin Waseem
- 168
- 1
- 15
0
votes
1 answer
Node.js How to send error message from express router to web console
In my application I am placing a http request and everything working fine in happy scenario. But when I gave wrong data to populate error deliberately, it shows error in node.js server console but does not send the error message to web console.
In…

usersam
- 1,125
- 4
- 27
- 54
0
votes
2 answers
Cannot configure Router in Express NodeJS
I have the next server file:
'use strict'
const app = require('express')();
const server = require('http').Server(app);
const io = require('socket.io')(server);
const index = require('./routes/index');
const chat =…

Max Wolfen
- 1,923
- 6
- 24
- 42
0
votes
1 answer
Given a controller function or route path, how do I get the full route URL in Express JS?
I am writing an Express JS application and I need to calculate a route given a controller function or route path.
For example:
let myUrl = functionToGetRoutePath(ThingsController.getThing); // would return https://host/api/v1/things/{id}
//…

James
- 697
- 5
- 23
0
votes
1 answer
Node server, html input null
I'm am trying to serve a front end application with node, just learning the basics of express. The issue that i'm having is that my javascript which i've linked into my html via an SRC cannot access the DOM. if console.log(document) I can see the…

Devin
- 134
- 9
0
votes
1 answer
Route 404 not found with express.router
I am very new to express and node in general, i have two route handlers with the same path but different method.. I am using express.router() and i was advised to chain the route handlers like this
but i get 404 Not found for GET /status but the…

JEEZSUSCRIZE
- 174
- 2
- 16
0
votes
1 answer
Malformed json in request body
In our react application, we are posting json string entered in a text area, to an express router function. In the client we are using axios to post the data to express router.
We do receive the data in the express router function like :
const…

kallada
- 1,829
- 4
- 33
- 64
0
votes
0 answers
How to chain Express routers while keeping track of the parameters?
I'm using express 4.16 and I'm trying to keep my code tidy so I'm using the router feature. I've learned we can chain routers. Let's take this example :
./server.js:
var express = require('express');
var app = express();
var usersRoutes =…

ashtrail
- 93
- 2
- 9
0
votes
1 answer
Express JS Multiple Route files not working
I am using AngularJS with NodeJS as backend. I have 2 route files - route1.api.js and route2.api.js. They are used in server.js as follows:
const route1Api= require("./src/api/route1.api");
const route2Api=…

Clairvoyant
- 81
- 1
- 9