Skip to main content

Questions tagged [url-routing]

URL routing lets you configure an application to accept request URLs that do not map to physical files.

1 vote
1 answer
256 views

HTTP routing with Mongoose

I'm trying to extend the Mongoose RESTful server example with URL routing. This code relies on the Mongoose library available here. This is heavily inspired by the routes class from this question but ...
S Meredith's user avatar
3 votes
2 answers
244 views

PHP Router For MVC with strict routing requirements

I had previously asked the question here. The response was pretty much "wow this is bad". So I learned everything I could and wrote what I believe to be better using TDD. The strict ...
Joséph Flames's user avatar
1 vote
1 answer
366 views

Index.php automatic router for custom MVC

In house we have been building our own MVC framework. One of the things that was important in the project was to not have to add routes manually but instead have a standard and let the index ...
Joséph Flames's user avatar
4 votes
1 answer
1k views

NextJS with a root level catchall route for all URLs dynamic middleware that splits into components

Here is the solution that I have. Due to the legacy product we have all of our URLs in one big Slug model in rails that maps URLs to models. EG ...
Romuloux's user avatar
3 votes
2 answers
228 views

Router and solid principle

I would like to know if my Routing system respects the solid principle ? The system is simple, Router class contains the routes and returns the correct route and Route class represents a route, ...
user avatar
2 votes
1 answer
369 views

Route Improvement in Laravel 8

I have below route. I am using Laravel 8. ...
Pankaj's user avatar
  • 127
4 votes
1 answer
416 views

URL router for production

So I've written a URL router which also allows for wildcards (path parameters). A URL like /users/{uuid} can be added and then, when a user sends a request to the ...
nils's user avatar
  • 151
2 votes
0 answers
106 views

implementation of a mvc url router with low coupling and solid principles

i'm building an url router and i want to improve it to respect SOLID principles, i want suggestions of how can i make it less coupled. here's my current code: Router.php ...
Thiago Dias's user avatar
0 votes
1 answer
397 views

http router written in Golang

in my jurney to learn Go, I decided to write a simple router which I called it Gouter, which I think it has most of the features in gorilla/mux but in my opinion it's easier to use. Anyway, it ...
Saeed M.'s user avatar
  • 453
2 votes
1 answer
105 views

PHP code for blacklisting and rewriting/redirecting URLs

We faced an issue where URLs had a wrong "subfolder" in its URL, so e.g. example.com/match1/randomgenerated should have been ...
user avatar
0 votes
1 answer
86 views

Improving PHP MVC code for personal website [closed]

Github for project: https://github.com/wrpd/portfolio I have a very general understanding of MVC but haven't ever implemented it. In an effort to improve my understanding and get back into a little ...
usulmuaddib's user avatar
2 votes
1 answer
78 views

Simple Go REST API that returns dummy messages

I am a learner in Go and wrote example below in a day so I would like to get some suggestions to improve it. It is a simple rest api that currently just accepts request and returns a dummy message. My ...
BentCoder's user avatar
  • 300
3 votes
0 answers
57 views

Rails route structure for managing tags

I'm hoping someone could vet my route structure as I've really been struggling with getting something that feels right. Right now I have this nested resource structure: ...
Dyl's user avatar
  • 31
4 votes
0 answers
636 views

Simple routing in Rust

After my last attempt, I started to learn Rust again. This time I wrote a simple HTTP router. I would appreciate it if you could help me to fix my mistakes. Here is the link of the repository main....
Saeed M.'s user avatar
  • 453
1 vote
0 answers
2k views

Implementation of Private Route with Auth using react-router and Context API

I'm trying to implement safe routes and checking if the user is authorized using only Context API. I'm also trying to avoid that the user can see a PrivateRoute, ...
Vencovsky's user avatar
  • 121

15 30 50 per page
1
2 3 4 5
9