S
S
Stanislav2017-10-22 14:57:19
Node.js
Stanislav, 2017-10-22 14:57:19

Routing in nodejs?

Greetings! In django and symfony, it's convenient to define routers in one place, and then refer to them by name, i.e.

// router
url(r'^$', views.home, name='home'),
// во вьюшках
<a href="{% url 'home' %}">На главную</a>

Thus, the link on all pages changes in one place. Didn't find how this is done on nodejs or express?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Ptolemy_master, 2017-10-22
@Chebaa

I don't understand why you need named routes.
It is enough to designate, for example, AND indicate a normal UPD link: Look here https://stackoverflow.com/questions/12854689/is-it...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question