import express from "express" ; import { randomCat , idCat , root } from "./handler" ; const router = express . Router ( ) ; let cache = 0 ; router . get ( "/rest/" , async ( req , res ) => { cache = await randomCat ( cache , req , res ) ; } ) ; router . get ( "/restId/:id" , idCat ) ; router . get ( "/" , root ) ; export { router } ;