diff --git a/.dockerignore b/.dockerignore index 3c3629e..81e83fe 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,2 @@ node_modules +.vercel diff --git a/.gitignore b/.gitignore index e8e5e5d..5ae8ba9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /.venv /.vscode /node_modules +/.vercel diff --git a/api/index.js b/api/index.js index 80a5511..cf64246 100644 --- a/api/index.js +++ b/api/index.js @@ -6,12 +6,7 @@ const PORT = process.env.PORT || 8080 const signer = new Signer() const server = http.createServer(async (req, res) => { - if (req.url === "/") { - res.writeHead(301, { - "Location": "https://github.com/pablouser1/SignTok" - }) - } - else if (req.url === "/signature" && req.method === "POST") { + if (req.method === "POST") { res.writeHead(200, { "Content-Type": "application/json", "Cache-Control": "s-max-age=1, stale-while-revalidate" // caching stuff for vercel @@ -34,16 +29,6 @@ const server = http.createServer(async (req, res) => { } })); } - - // If no route present - else { - res.writeHead(404, { - "Content-Type": "application/json" - }) - res.write(JSON.stringify({ - message: "Route not found" - })) - } res.end() })