ExpressJS has a built-in class called router. A router is just a class that allows developers to write mountable and modular route handlers.
A Router is an instance of ExpressJS' core routing system. That means, all routing methods from an ExpressJS application are available:
const router = express.Router()
router.get('/', (request, response, next) => {
response.send('Hello there!')
})
router.post('/', (request, response, next) => {
response.send('I got your data!')
})