Skip to content

Commit

Permalink
Serverless functions
Browse files Browse the repository at this point in the history
  • Loading branch information
imshn committed May 14, 2024
1 parent 87cdee7 commit 9692643
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ const transporter = nodemailer.createTransport({


app.get('/', (req, res) => {
res.sendFile("index.html", { root: path.join(__dirname, 'public') })
res.sendFile("index.html", { root: path.join(__dirname, 'src') })
});

app.get("/service", (req, res) => {
res.sendFile("service-details.html", { root: path.join(__dirname, 'public') })
res.sendFile("service-details.html", { root: path.join(__dirname, 'src') })
})

app.get("/about", (req, res) => {
res.sendFile("about.html", { root: path.join(__dirname, 'public') })
res.sendFile("about.html", { root: path.join(__dirname, 'src') })
})

app.get("/contact", (req, res) => {
res.sendFile("contact.html", { root: path.join(__dirname, 'public') })
res.sendFile("contact.html", { root: path.join(__dirname, 'src') })
})


Expand Down Expand Up @@ -63,13 +63,13 @@ app.post('/contact', (req, res) => {


app.get("/blogs", (req, res) => {
res.sendFile("blogs.html", { root: path.join(__dirname, 'public') })
res.sendFile("blogs.html", { root: path.join(__dirname, 'src') })
})

app.get("/*", (req, res) => {
// res.redirect("/")

res.sendFile("/", { root: path.join(__dirname, 'public') })
res.sendFile("/", { root: path.join(__dirname, 'src') })
})

// Start the server
Expand Down

0 comments on commit 9692643

Please sign in to comment.