Skip to content

Commit

Permalink
Setup deployment
Browse files Browse the repository at this point in the history
Signed-off-by: joeyyy09 <menteharshith@gmail.com>
  • Loading branch information
joeyyy09 committed Oct 3, 2024
1 parent 6c6826b commit 4286d10
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules
.env
.env
.vercel
4 changes: 4 additions & 0 deletions backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ app.use("/auth", authRoutes);
app.use("/pass", passRoutes);
// app.use("/key", keyRoutes);

app.get("/", (req, res) => {
res.send("Backend is running");
});

const PORT = process.env.PORT || 3300;

mongoose.set("strictQuery", false);
Expand Down
20 changes: 20 additions & 0 deletions backend/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 2,
"builds": [
{
"src": "index.js",
"use": "@vercel/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "/index.js"
}
],
"env": {
"DB_URL": "mongodb+srv://yushmanth:S77SdrxaewVbNwjf@cluster0.a3z65xb.mongodb.net/?retryWrites=true&w=majority",
"JWT_ACCESS_KEY": "hello world",
"JWT_REFRESH_KEY": "HKJSHJDHSAJK ASHKJHSDJKA"
}
}

0 comments on commit 4286d10

Please sign in to comment.