From 2a4b346ad8ec1b99cc23a0ef0fe490bab0ebe486 Mon Sep 17 00:00:00 2001 From: Mandeep Singh Date: Fri, 18 Oct 2024 18:15:56 +0530 Subject: [PATCH] Update deployment source --- backend/.dockerignore | 1 + backend/Dockerfile | 2 +- backend/{server.js => app.js} | 0 backend/package.json | 5 +++-- backend/vercel.json | 4 ++++ 5 files changed, 9 insertions(+), 3 deletions(-) rename backend/{server.js => app.js} (100%) create mode 100644 backend/vercel.json diff --git a/backend/.dockerignore b/backend/.dockerignore index 6d68aea..788df64 100644 --- a/backend/.dockerignore +++ b/backend/.dockerignore @@ -1,4 +1,5 @@ **/.classpath +**/vercel **/.dockerignore **/.env **/.git diff --git a/backend/Dockerfile b/backend/Dockerfile index 634ef4b..9a59f98 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -21,4 +21,4 @@ EXPOSE 5000 RUN chown -R node /app USER node -CMD ["node", "server.js"] \ No newline at end of file +CMD ["node", "app.js"] \ No newline at end of file diff --git a/backend/server.js b/backend/app.js similarity index 100% rename from backend/server.js rename to backend/app.js diff --git a/backend/package.json b/backend/package.json index 5f44584..173a8f4 100644 --- a/backend/package.json +++ b/backend/package.json @@ -2,9 +2,10 @@ "name": "ecommerceapi", "version": "1.0.0", "description": "", - "main": "server.js", + "main": "app.js", "scripts": { - "start": "node server.js" + "start": "node app.js", + "vercel-build": "echo helloworld" }, "keywords": [], "author": "", diff --git a/backend/vercel.json b/backend/vercel.json new file mode 100644 index 0000000..56680c9 --- /dev/null +++ b/backend/vercel.json @@ -0,0 +1,4 @@ +{ + "rewrites": [{ "source": "/(.*)", "destination": "/api" }] +} + \ No newline at end of file