Answers for "router vs app express"

0

router vs app express

var express = require('express'),
    dogs    = require('./routes/dogs'),
    cats    = require('./routes/cats'),
    birds   = require('./routes/birds');

var app = express();

app.use('/dogs',  dogs);
app.use('/cats',  cats);
app.use('/birds', birds);

app.listen(3000);
Posted by: Guest on October-29-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language