Установили библиотеку json-server, заполнили данные в db.json, настроили скрипт для запуска сервера

This commit is contained in:
isHardCoded
2025-06-25 15:14:13 +03:00
parent b8e88a4866
commit 2812645834
2 changed files with 53 additions and 27 deletions
+25
View File
@@ -0,0 +1,25 @@
{
"products": [
{
"id": 1,
"name": "Sneakers Red & White 2025",
"brand": "NIKE",
"price": 38.0,
"imageUrl": "./src/assets/images/sneakers-image.jpg"
},
{
"id": 2,
"name": "Sneakers Red & White 2025",
"brand": "NIKE",
"price": 38.0,
"imageUrl": "./src/assets/images/sneakers-image.jpg"
},
{
"id": 3,
"name": "Sneakers Red & White 2025",
"brand": "NIKE",
"price": 38.0,
"imageUrl": "./src/assets/images/sneakers-image.jpg"
}
]
}
+1
View File
@@ -5,6 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"server": "json-server --watch db.json --port 8000",
"build": "vite build",
"lint": "eslint .",
"preview": "vite preview"