Hi,
Site: hmutils.netlify.app
Directory structure:
- netlify
- functions
- echo
- index.mts
- echo
- functions
Contents of index.mts:
import type { Context, Config } from "@netlify/functions"
export default async (req: Request, context: Context) => {
const { value } = context.params;
return new Response(value);
};
export const config: Config = {
path: "/echo/:value",
}
Function endpoint: https://hmutils.netlify.app/echo/:value
Function test: https://hmutils.netlify.app/echo/test
I also see this and other functions in here:
Netlify Dev is running the function and it’s working fine, but the deployed function in Netlify responds with 404:
404
Not Found
The project is a Svelte Kit initial project and I use pnpm instead of npm.