Created
October 5, 2018 18:18
-
-
Save killmenot/3e49d95c9bd27caa4ad241e9d25302a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const app = express(); | |
const router1 = express.Router(); | |
router1.route('/test1').get(function(req, res) { | |
res.json('test1'); | |
}); | |
const router2 = express.Router(); | |
router2.route('/test2').get(function(req, res) { | |
res.json('test2'); | |
}); | |
app.use('/', router1) | |
app.use('/', router2) | |
app.listen(9090) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment