From f1b18688bbb4f772c7ac73009c4e9eda749d36ac Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Fri, 10 Sep 2021 12:15:08 +0530 Subject: [PATCH] fix: ci --- .gitignore | 3 +++ netlify.toml | 4 +++- netlify/api.js | 21 --------------------- 3 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 netlify/api.js diff --git a/.gitignore b/.gitignore index 9d566a677..fb7adeee3 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,6 @@ tests/*/screenshots # Tests videos tests/*/videos + +# Local Netlify folder +.netlify \ No newline at end of file diff --git a/netlify.toml b/netlify.toml index ede59fb2a..25ad05154 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,5 +1,7 @@ [build] - functions = "netlify/" + base = "packages/hoppscotch-app/" + publish = "dist" + command = "npm run generate" environment = { NODE_VERSION = "14" } [[redirects]] diff --git a/netlify/api.js b/netlify/api.js deleted file mode 100644 index b15b09b43..000000000 --- a/netlify/api.js +++ /dev/null @@ -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" } - } -}