The month of May was a very singular one for us. We announced our latest 10M$ fundraising with Index Ventures, and the next week, we also officially released the stable version. Two major milestones for the sustainability of the project and the community!
On June 9th, today, I will attend the online Paris API meetup organized by Shubham Sharma. We will talk about the future of the JAMstack, the low-code movement, and how we are organized as an open-source company. The event is free and will be in English, join us!
How do they do API's @ Strapi w/ Aurélien Georget | Strapi
We are thrilled to welcome Sunny as a Marketing Coordinator! She's going to promote the feature releases, social events, and more. As a fast-growing company, we have to reinforce our marketing team to respond to all the internal and external requests. Feel free to ping her and say hi on the community public Slack 🙂
We are still looking for new awesome people to join the team. If you want to be part of the journey, send us through your application!
As you might know, we officially released the stable version. We started five years ago by making the first commit. Since then, the initial framework had became a product called an Headless CMS. The vision is still the same: being the most flexible and customizable solution to manage content.
Read the official announcement.
The stable introduced two new commands to dump and restore the settings. More precisely, it dumps the core_store
table into a file. Many users reported it was hard to migrate a project from an environment to another. Even if the following commands don't solve the entire issue, as we don't migrate data but only settings, it's the first step to an easier migration setup.
Use the commands is dead-simple! Open your terminal at the root of the Strapi project and execute the command.
1yarn strapi config:dump -f dump.json
or
1npm run strapi configuration:dump -- -f dump.json
Note: The file will be saved at the root of your project folder.
Then, deploy your project on production and run the restore command before launching the server.
1yarn strapi config:restore -f dump.json
That's it! Your project will have the same settings in development and production. Here is the list of settings which can be migrated:
Content Manager - Layout, placeholders and labels of the Edit and List views. - Filters, search and bulk actions settings. Users & Permissions - Providers settings - Email template - Advanced settings Media Library - Settings (responsive-friendly, file optimization, etc).
Managing configurations can be challenging sometimes. In order to follow best practices, we introduced a new Configuration API within the core. Instead of only using JSON files to set configurations, you can also use JavaScript file and enjoy the new API.
We'd always used the JSON format before the Configuration API. For instance, if you want to create a custom configuration file called config/frontend.json
and you are done!
1{
2 "url": "https://strapi.io"
3}
To access the value, you can easily do it like this in any file.
1module.exports = () => {
2 console.log(strapi.config.get('frontend.url'))
3 // It will return "https://strapi.io"
4};
Moreover, the Configurations API also introduces a better way to manage environment variables using .env
file. Let's keep the same example, but instead of using the JSON format, we will create a configuration file with JavaScript config/frontend.js
.
1module.exports = () => ({
2 url: 'https://strapi.io',
3});
Note: Don't forget to delete the previous config/frontend.json
file.
It does the exact same thing as we did with the JSON configuration files. However, we can now get access to the Configurations API using parameters available in the function.
1module.exports = ({ env }) => ({
2 url: env('FRONTEND_URL', 'https://strapi.io'),
3});
The code-block above uses the environment function (env) to define a global name to this configuration. It means that if you create a .env
in your project, it will use the value set for FRONTEND_URL
into the .env
file.
For example, if you've created a .env
file at the root of your project like this:
1FRONTEND_URL=https://myfrontend.com
Then, you start your project running the following command:
1ENV_PATH=.env yarn develop
The value of the strapi.config.get('frontend.url')
will be [https://myfrontend.com](https://myfrontend.com)
. If there is no .env
file, the value will be [https://strapi.io](https://strapi.io)
.
If you want to dig deeper, please take a look at the documentation.
Next month, I'll give more details about the RBAC feature coming and what are the impacts on the open-source project as it is our first partial paid feature. Regarding the Enterprise Edition, if you want more details about the pricing and the ETA, please give us a shout.
Feel free to engage with us and ask any questions you have. We look forward to answering you!
See you soon 👋
Co-founder & Chief Product Officer, I started developing since I was 13 years old, I already developed 2 CMS before and am currently in charge of the product vision & strategy.