Candidate for deletion
💥 😱 🎻
See Repo Link
Changes: no longer fetching data with Node/Express, JSONServer/FakerData
- Moved proj to [PDETAILS] Branch
Install the dependencies and run by:
cd [to-local-folder]
$ npm install
$ npm start
@url => http://localhost:4000/api/products?
@param => category
@param => _page
@param => _limit
@param => _sort
ex: http://localhost:4000/api/products?_page2&_limit=20&_sort=name
ø Categories
-----------
• furniture
• lighting
• accessories
ø Products
------------
• id <number>
• name <string>
• image <string>
• category <string>
• description <string>
• price <number>
• /shop/products/:category
• /shop/products/cart
• /shop/produts/checkout
• /shop/products/:category/:id
• /shop/products/all
• /shop/products/:category/:id (details page)
- Need to redo pagination
screenshot
- Hosted with GC Functions Firestore DB
- See DataLink
- Redux: actions, reducers, store, types
- Shop: react components
(production)
- deployed fb functions
- endpoints:
app.get("/shop/products/all", getProducts );
app.get("/shop/products/:category/:id", getProduct);
app.get("/shop/categories/all", getCategories);
app.get("/shop/cart", getCart);
app.post("/shop/product", createProduct);
Param | Url |
---|---|
category | localhost:4000/api/products?category=furniture |
_page | localhost:4000/api/products?_page2 |
_limit | localhost:4000/api/products?_page2&_limit=20 |
_sort | localhost:4000/api/products?_page2&_limit=20&_sort=name |
- [Category] - furniture
- [Category] - lighting
- [Category] - accessories
- [product] - id :number
- [product] - name :string
- [product] - image :string
- [product] - category :string
- [product] - description :string
- [product] - price :number
Options -MultiViews
RewriteEngine On
Rewritecond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]