Get started with Strapi v4 in 3 minutes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Let's get up and running  with Strapi in three minutes. We’ll need to create our Strapi  project with the following command.  npx create-strapi-app my-project --quickstart Using the quickstart flag is a great  way to get up and running quickly,   by allowing the project creation process to  select some default configuration settings.   This will create files in the directory in  which it was executed, and because we’ve   used the quickstart flag, our project will  be configured to use an SQLite database. Once created, our project will  launch in development mode. Before we continue to the Strapi admin panel, we  need to create our first user, the root admin. In Strapi, we first need to create the data  structure of the content that we want to manage. The Content Types Builder,   which we can access in the left navigation,  is one way in which we can build them. Let’s say that we want to create  a catalogue of restaurants. Time to create our first collection  type - we’ll call it “restaurant”. Let’s add some fields to store the name,  description, and pictures. Let’s create another   collection type named Category, add a field “Name”  and a many-to-many relationship with restaurants. Let’s demonstrate the Components feature.   We’ll create a gallery, with the  fields: title, and multiple pictures. We’ll also create a text-block, with  the text fields: title, and content. Let’s create a single type  - we’ll name it “home page”. Let’s add a field named “Title”,  and a dynamic zone named “Body”,   that will make use of our previously created  components to add a text-block and a gallery. With our structures created,   let’s enter the content manager and  contribute some content to our application. First we’ll add a couple of categories. Next, we’ll add a restaurant,  complete with a description,   pictures that we upload, and select  a category to which it belongs. Finally, we’ll add a homepage, complete  with a gallery and a content-block. With our content created,   let’s visit forward-slash restaurant, where  we’ll see an HTTP 403 Forbidden error. This is because Strapi protects  our API end-points by default. So let’s adjust our roles  and permissions by opening up   a few of the public actions for  our restaurant and homepage types. If we refresh the page, we can see that  we now have access to our restaurant data. The same is true for our homepage  data at forward-slash homepage.   If we want to populate the components, we need  to add ?populate=body to the end of our request. That’s it for getting up and  running with Strapi in 3 minutes.
Info
Channel: Strapi
Views: 113,170
Rating: undefined out of 5
Keywords: Strapi, headless CMS, gatsby, gatsbyjs, react, strapi blog, gatsby blog, headless, content management, node.js, react cms, blog tool
Id: h9vETeRiulY
Channel Id: undefined
Length: 3min 15sec (195 seconds)
Published: Tue Nov 30 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.