28 lines
774 B
TypeScript
28 lines
774 B
TypeScript
import express, { Request, Response } from "express";
|
|
|
|
const router = express.Router();
|
|
|
|
const GREETINGS = [
|
|
"How can I help you today?",
|
|
"What can I do for you today?",
|
|
"Ready when you are.",
|
|
"What's on your mind today?",
|
|
"Let's get started.",
|
|
"What would you like to work on?",
|
|
"How can I assist you?",
|
|
"What are we tackling today?",
|
|
"Where should we begin?",
|
|
"Let me know what you need.",
|
|
"What brings you here today?",
|
|
"How can I make your day easier?",
|
|
"What's next on the list?",
|
|
"I'm here whenever you're ready.",
|
|
];
|
|
|
|
router.get("/", async (_req: Request, res: Response): Promise<any> => {
|
|
const greeting = GREETINGS[Math.floor(Math.random() * GREETINGS.length)];
|
|
return res.status(200).json({ greeting });
|
|
});
|
|
|
|
export default router;
|