package com.kpaudel.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class FrontendController {

    // Matches anything that is not an API or a static resource
    @RequestMapping(value = {"/{path:[^\\.]*}", "/**/{path:[^\\.]*}"})
    public String forward() {
        // Forward to index.html for React Router to handle
        return "forward:/index.html";
    }
}
