Skip to content
Advertisement

Tag: routes

res.redirect() not working properly in express JS

I’ve been working on creating an API for a blockchain I’ve made. Everything was going fine, until I updated Node and Windows… ====== ISSUE ====== After performing a POST request, I cannot redirect to a GET page anymore. (Using Postman only no front end yet). For some reason, it was working fine and now I can’t do it in a

Difficulties to make another route expressJS

I am doing a site as of my studies. The technology being free, I decided to code with nodejs/Express. For my first route /home, everything went well. But I can’t create others. Yet I thought I understood the system well. It would bother me if it was due to a silly error because I have been on this problem for

Handling complex query parameters Express.Js

I’m making REST APIS with Express.js I have the following express route: /api/customer I added multiple query params to the route like this: In my controllers I handle all of these with If and there are so many cases I feel that this method would not scale, is there a better way of handling this ? This is the code

Why am I getting an error in my Route Redux code?

I can’t find my error in the code. Could someone explain to me. Test: Nav:’ should be rendered on the path “/”. The “Home” component should be rendered only on the path “/” The “Home” component should not be displayed in any other route The route “/product/:id” should show only the component ProductDetail’ The route “/products/create should show only the

Angular iubenda-cs-preferences-link not work after routing

In my Angular project I need to add iubenda, after inserting the scripts with all my correct public and private keys, everything seems to work correctly. At this point I need to add a button to change cookie preferences, so I’m going to insert <a mat-button class=”iubenda-cs-preferences-link”> Update Cookie Preferences </ a> At the first loading of the page, everything

TypeError: Router.use() requires a middleware function but got a string at Function.use

I’m new to Node and ExpressJs development, however, I cannot import a module router created by me as an exercise. It gives me this error: I have already tried the module.exports solution, but it doesn’t work. The initialize function also fails. Here are the versions I am working with: Node version: v10.19.0 Express version: 4.17.2 Index.js ProgettoRouting.js Answer You need

Advertisement