aboutsummaryrefslogtreecommitdiffstats
path: root/pages/api
diff options
context:
space:
mode:
Diffstat (limited to 'pages/api')
-rw-r--r--pages/api/hello.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/pages/api/hello.js b/pages/api/hello.js
new file mode 100644
index 0000000..5d79cc1
--- /dev/null
+++ b/pages/api/hello.js
@@ -0,0 +1,7 @@
+// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
+
+const helloAPI = (req, res) =>{
+ res.status(200).json({ name: 'John Doe' })
+}
+
+export default helloAPI; \ No newline at end of file