Skip to content

devleague/express-router-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Express Router Examples

This is a basic demo of what Express router objects can do.

It demonstrates using routes in a modular way without having to pass an instance of an express app into a route file.

Before

var routes = require('./routes');
routes(app);

After

var routes = require('./routes');
app.use('/', routes);

Try testing the following requests:

Be sure to check both the console and browser window when sending requests.

For more information, refer to the docs: http://expressjs.com/api.html#router

About

Demo application using Express router objects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published