Well, I have no idea what you are doing in the following line of code.
let short = shortURLs[-1] ? ++shortURLs[-1]["short_url"] : 1;
My guess is you are trying to get the short URL by incrementing an integer each time someone hits that endpoint. I believe it is correct to generate the URL that way.
About using a DB, you need some way of persisting the long URLs and the short ones so that you don’t issue duplicate short URLs and redirect requests accordingly. Yes you need some kind of DB.