Skip to content

Commit 4c70297

Browse files
committed
vercel path
1 parent 5a9613b commit 4c70297

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

server.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,22 @@ app.get("/email", async (req, res) => {
4747
});
4848
});
4949

50-
51-
5250
app.get("/openai", async (req, res) => {
53-
54-
const {recipe_country_of_origin, is_lactose_intolerant, is_vegan, what_are_user_other_dietary_requirements } = req.query
51+
const {
52+
recipe_country_of_origin,
53+
is_lactose_intolerant,
54+
is_vegan,
55+
what_are_user_other_dietary_requirements,
56+
} = req.query;
5557
try {
5658
console.log(
5759
{ recipe_country_of_origin },
5860
{ is_lactose_intolerant },
5961
{ is_vegan },
60-
{what_are_user_other_dietary_requirements}
62+
{ what_are_user_other_dietary_requirements }
6163
);
6264

63-
const prompt = `Provide a recipe for a dish from ${
64-
recipe_country_of_origin
65-
}, taking into account the fact that I'm ${
65+
const prompt = `Provide a recipe for a dish from ${recipe_country_of_origin}, taking into account the fact that I'm ${
6666
is_lactose_intolerant === "true"
6767
? "lactose intolerant"
6868
: "not lactose intolerant"
@@ -105,14 +105,11 @@ app.get("/openai", async (req, res) => {
105105
// const dishCountry = req.body.recipe_country_of_origin;
106106
// const isUserLactoseIntolerant = req.body.is_lactose_intolerant;
107107

108-
109108
// res.json({
110109
// message: `Variables ${dishCountry} and ${isUserLactoseIntolerant} received successfully`,
111110
// });
112111
// });
113112

114-
115-
116113
app.use(express.static("public"));
117114
const port = process.env.PORT || 3000;
118115
app.listen(port, () => {

vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"routes": [
1010
{
11-
"src": "/(.*)",
11+
"src": "/public/(.*)",
1212
"dest": "index.js"
1313
}
1414
]

0 commit comments

Comments
 (0)