diff --git a/templates/basic/routes/api/user.ts b/templates/basic/routes/api/user.ts new file mode 100644 index 0000000..73d2695 --- /dev/null +++ b/templates/basic/routes/api/user.ts @@ -0,0 +1,11 @@ +/** + * `./routes/api/` + * ...is where we put file-based REST API endpoints + * this one is accessible via https:///api/user + */ +export default eventHandler(() => { + return { + user: "AYO", + date: new Date(), + }; +});