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