32
loading...
This website collects cookies to deliver better user experience
npx create-strapi-app project-name --quickstart
--quickstart
means that we will use a blank project, but you can use a template instead which will come withcd project-name
yarn develop
Users
collection created for us, Create new collection type
Products
./products //to get all the products or add a product
/products/:id // to get one product or delete or update
settings > USERS & PERMISSIONS PLUGIN > Roles > Public
// find all : localhost:1337/products
[{
"id":1,
"name":"T-shirt",
"description":"A unique and special T-shirt",
"price":70,
"published_at":"2021-06-13T16:22:02.560Z",
"created_at":"2021-06-13T16:21:58.801Z",
"updated_at":"2021-06-13T16:22:02.573Z"
}]
// find one : localhost:1337/products/1
{
"id":1,
"name":"T-shirt",
"description":"A unique and special T-shirt",
"price":70,
"published_at":"2021-06-13T16:22:02.560Z",
"created_at":"2021-06-13T16:21:58.801Z",
"updated_at":"2021-06-13T16:22:02.573Z"
}