Creating our first content-type – a classroom
We will create our first content-type, which will represent the classroom
entity. For now, a classroom will have name
, description
, and maximum students
values. Let's get started:
- Run the Strapi admin panel, normally at
http://localhost:1337/admin
.Remember
By default, Strapi uses port
1337
. This value is used in theserver.js
file and can be overridden using thePORT
environment variable. We will discuss this later on in Chapter 9, Production-Ready Applications. - Navigate to Content-Type Builder, under the PLUGINS section.
- Click on Create new collection type.
- For Display name, enter
Classroom
; leave the other fields as they are.Important Note
API ID (Singular) and API ID (Plural) are auto-populated from the Display name field. API ID (Singular) is used in generating the database tables while API ID (Plural) is used to access the content-type via the API URL; we will see this in action later on in this chapter...