August 2017
Beginner
374 pages
10h 41m
English
Many libraries and frameworks, like Express, Rails, Ember, or Angular use static routing. With static routing, you declare your routes during the initialization stage of the app, before any rendering happens.
For example, configuring a route in express would look as follows:
app.get('/', handleMainPage)app.get('/posts', handlePostsPage)app.get('/posts/:id', handlePostPage)app.listen()
All routes are (statically) declared before the app listens.
Read now
Unlock full access