liyasthomas 4 ani în urmă
părinte
comite
f1b18688bb
3 a modificat fișierele cu 6 adăugiri și 22 ștergeri
  1. 3 0
      .gitignore
  2. 3 1
      netlify.toml
  3. 0 21
      netlify/api.js

+ 3 - 0
.gitignore

@@ -104,3 +104,6 @@ tests/*/screenshots
 
 # Tests videos
 tests/*/videos
+
+# Local Netlify folder
+.netlify

+ 3 - 1
netlify.toml

@@ -1,5 +1,7 @@
 [build]
-  functions = "netlify/"
+  base = "packages/hoppscotch-app/"
+  publish = "dist"
+  command = "npm run generate"
   environment = { NODE_VERSION = "14" }
 
 [[redirects]]

+ 0 - 21
netlify/api.js

@@ -1,21 +0,0 @@
-// Docs on event and context https://www.netlify.com/docs/functions/#the-handler-method
-exports.handler = (event) => {
-  switch (event.httpMethod) {
-    case "GET":
-      try {
-        const name = event.queryStringParameters.name || "World"
-        return {
-          statusCode: 200,
-          headers: {
-            "Content-Type": "application/json",
-          },
-          body: JSON.stringify({ message: `Hello ${name}` }),
-        }
-      } catch (e) {
-        return { statusCode: 500, body: e.toString() }
-      }
-
-    default:
-      return { statusCode: 405, body: "Method Not Allowed" }
-  }
-}