I love that Digital Ocean provides the ability to host your frontend, backend and db all in one place. Coming from a WordPress background I'm loving the JAM stack way of building websites, although hosting a backend and db required too much additional work until now. Thanks for the video :)
In case someone might be looking for the answer, relational fields (like the field `User` in this example) are not populated in the API by default with the latest version of Strapi for performance considerations. Thus, you may not be seeing it in the JSON. Add this URL parameter "?populate=User" to the end of the URL to populate it.
Great video and learnt lots. My only prob is I tried to deploy at the end and got errors - would have really appreciated more coverage on how to do that (and especially how to include a database that wasn't the sqlite) - deployment for me is the number 1 prob with strapi applications. Would it be possible to put together a video on how this could be deployed in different ways (eg: Apps, then using Docker etc on Digital Ocean?)
Hey There! Thanks for the comment. We chatted about your issues and are going to try to looking into creating video(s) to address deploy errors. Keep a look out!
@@DigitalOcean Wow - Huge thanks and really appreciated. Chris' video was amazing and thanks so much for it and I really did learn a huge amount, and know it was just a bit of having to keep the presentation to an hour etc. I'd never done NextJS before (only some React) and so that's been a great introduction and Strapi is amazing on so many levels. Just being able to fully deploy it together is the thing I'm missing so this is really welcomed and looking forwards to seeing any future videos from you.
this is so sweet even for 2023. But the thing is Strapi has aonther new schema for its api response, everything is surrounded by data data data. have to destructure the same prop over and over lmao. Maybe touching the files in the strapi project can improve this.
Hi! Is it better to setup an API using Strapi or to develop your own taking advantage of Next JS api routes. Which approach do you recommend to use in which context?
Chris I support this channel because of you, I wish you were still just with scotch but I guess you had to earn more... Anyways Digital ocean is still trash ... blocking accounts with no reason ... Thanks chris for the good work
I'm having an issue with getting the user data after creating the relation data point. I'm assuming it's because of updates to Strapi since this tutorial was created, but has anyone tried/succeeded in getting the user data set to come through when pulling the blog data.
Hey Chris, can you do publish a next.js app with dynamic routing on App Platform? I can't get the app to do the dynamic routes properly on App Platform.
at 31:25 he adds a new post via strapi. He currently fetches the data in the frontend with NextJs getStaticProps, which is done at built time. So why on earth is the new post displayed here on reloading the page? wouldn't he have to re-build the entire app? I feel like I am misunderstanding a key piece here
When the author hits refresh the server will fetch data from localhost / posts and process the information before rendering the page. " rebuilding the entire app".
Yes it should. But let's say you added a new piece of content/page inside your CMS. Then Next.js wouldn't know about it yet. When it goes to find it, it will 404 and then it will fallback and say "let me go see if its new content"
Dear RU-vidr, I love your style but please show the finished project in the beginning, this could be done when editing before posting the stream. Thanks!
Thanks but please do NextAuth with Django Rest Framework, with email and password. Also, adding OAuth on the same tutorial will be great. I am desperetely waiting for your response.
Well, cost could by reduced by deploying under same server. I don’t know why cost is not optimised, a single server could do work for 5$ even DB could be deployed, backend, FE all.
So freaking cool! Loving this run-through but alas...I'm also getting TypeError: coverages.map is not a function (I named my post type coverage instead of post).
This is outdated has to add some updates. For who is couldn't see the relations there is two way; 1- You can use post?populate=* and don't forget to give permission(find, findOne) to the relation. 2- Install Populate-deep extension to see all nested levels.
You'll need to include any relationships in a "populate" field now docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.html#population
My god what a nightmare trying to work with Strapi. Even following this video to the T doing something simple as creating a content type is impossible. I added the fields and created the content type and it just re-directed me to "Users" and never actually created the content type. Didn't throw an error, nothing. So I try to create it again thinking something went wrong, then Strapi decides to restart. Now I get errors in the terminal indicating that a content type name of "Post" is duplicated, no instructions on how to fix or where to even begin. This is NOT a friendly bootstrapper by any means. I was able to setup and configure contentful in Minutes, this not so much.
Still looking for a tutorial on how to do it on the same server like a VPS . With pm2 . Because docker was so difficult to learn and I have 1.5weeks to deliver the project and got to figure out how to deploy it 🫢😬🤣