Convert the Express server code to TypeScript, adding proper type definitions for requests and responses.