|
@@ -1,4 +1,13 @@
|
|
|
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
|
|
+import type {NextApiRequest, NextApiResponse} from "next";
|
|
|
+
|
|
|
+// import { MongoClient, Db, MongoClientOption }from "mongodb";
|
|
|
+
|
|
|
+const cfg = {
|
|
|
+ url: "mongodb://root:mongodb.rds.aliyuncs.com:3717",
|
|
|
+ name: "admin"
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
export default function handler(req, res) {
|
|
|
res.status(200).json({ name: 'John Doe' })
|