Spaces:
Sleeping
Sleeping
Commit
·
a74039d
1
Parent(s):
f10b230
check
Browse files- index.js +4 -1
- package.json +2 -1
index.js
CHANGED
@@ -56,8 +56,11 @@ const getData = async () => {
|
|
56 |
return { title, price, image };
|
57 |
};
|
58 |
|
59 |
-
|
60 |
app.get("/", async (req, res) => {
|
|
|
|
|
|
|
|
|
61 |
const data = await getData();
|
62 |
res.type("json");
|
63 |
res.send(JSON.stringify(data));
|
|
|
56 |
return { title, price, image };
|
57 |
};
|
58 |
|
|
|
59 |
app.get("/", async (req, res) => {
|
60 |
+
res.send('go to /test');
|
61 |
+
})
|
62 |
+
|
63 |
+
app.get("/test", async (req, res) => {
|
64 |
const data = await getData();
|
65 |
res.type("json");
|
66 |
res.send(JSON.stringify(data));
|
package.json
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
{
|
2 |
"scripts": {
|
|
|
3 |
"dev": "nodemon index.js"
|
4 |
},
|
5 |
"dependencies": {
|
6 |
"express": "^4.19.1",
|
7 |
"puppeteer": "^22.6.0"
|
8 |
}
|
9 |
-
}
|
|
|
1 |
{
|
2 |
"scripts": {
|
3 |
+
"start": "node index.js",
|
4 |
"dev": "nodemon index.js"
|
5 |
},
|
6 |
"dependencies": {
|
7 |
"express": "^4.19.1",
|
8 |
"puppeteer": "^22.6.0"
|
9 |
}
|
10 |
+
}
|