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]
185 questions
-1
votes
1 answer
Express different paths but same logic
i have a route like this
router.post('/policy', async (req, res, next) => {
try {
console.log(req.body);
} catch (e) {
console.log(e)
res.sendStatus(500)
}
})
I want the same logic to be executed when /role is…
Phil
- 100
- 1
- 17
-1
votes
1 answer
How to store more information on the server when POST a file?
This is my uploadRouter.js that I use to POST images to the server:
const express = require('express');
const bodyParser = require('body-parser');
const authenticate = require('../authenticate');
const multer = require('multer');
const cors =…
user3486308
- 1,776
- 3
- 25
- 51
-1
votes
2 answers
Express route : control flow with router.use/all and router.param
I would like to validate params using these kind of middleware. The problem is that router.param is always applied before the first middleware router.all (I also tried with router.use, it doesn't work because the param is common to both…
Abk
- 266
- 1
- 8
-1
votes
3 answers
How to build large scale express.js sites
I am pretty new to the node.js and express.js landscape. However I have been trying to wrap my head around the code behind creating a site (20+ pages for example) in express.js without the code getting pretty large.
A route, when using a view…
Ben
- 109
- 1
- 9
-2
votes
1 answer
Request Parameter of type [object Event] (Express Router)
I am currently developing a NodeJS express app to manage customers.
Within this app, I have the following route:
router.get('/customers/details/:customerID', accessControl.grantAccess('readAny', 'customer'),…
Max
- 327
- 1
- 4
- 16