question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to configure router with 2 params. like app.get('/router','controller')

See original GitHub issue

here is bellow what i want: MyController—>with some actions: action_1*(){}, action_2*(){},action_3*(){}…etc. in app>>router.js: app.verb(‘/my’,‘my’); i want the routes maps:

http://domain/my/action_1=>MyController.action_1;
http://domain/my/action_2=>MyController.action_2;
http://domain/my/action_2=>MyController.action_3;

… but, the configure app.verb('/my','my'); could not achieve this. #201; looks like you can’t configure routes with two params one is for router while another is controller name

is it a bug? if not ,how could i satisfy this demand(says:router auto mapping)? maybe a suugestion is that: we don’t need to declare the route configure in the router.js file if we have some controller,it should shape the mappings router/action =>controller/action automaticly like sails does. thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
guzuomusecommented, Mar 30, 2017

got it, i’ll try maybe ,merging this feature into the core would be better. thank u

0reactions
dead-horsecommented, Mar 31, 2017

close for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple params with React Router - Stack Overflow
I use React 15.0.2 and React Router 2.4.0. I want to pass multiple params to my route and I'm not sure how to...
Read more >
Express Tutorial Part 4: Routes and controllers - MDN Web Docs
First we create routes for a wiki in a module named wiki.js. The code first imports the Express application object, uses it to...
Read more >
Routing — Connexion 3.0.dev0 documentation
Optionally, you can include x-swagger-router-controller in your operation definition, ... from connexion.resolver import RelativeResolver app = connexion.
Read more >
Routing (Symfony Docs)
This parameter is used to determine which controller and action is executed when the route is matched. _format: The matched value is used...
Read more >
How To Handle Routing in React Apps with React Router
In this tutorial, you'll install and configure React Router, build a set of routes, and connect to them using the <Link> component.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found