Build an API With Strapi

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
good morning everybody hello hello i guess i don't need that anymore um welcome everyone how's everybody doing today i just had to do a last minute two minutes before this tech talk uh computer restart so let's settle here everybody what's up how's it going let me go grab the chat real quick because it's always fun to see chat on screen gets the energy going this early in the morning i don't know if it's early anymore i'm running out of my times so let's bring that up let's bring this up and what's up what's up sheldon eddie says i'm looking forward to this i can't count the amount of times i've googled or try to find out how to make an api and uh this is going to be an easy one we are going to get most of the api done in i don't know four to ten minutes like you'll you'll see how awesome it is uh to use strappy which is a node javascript framework to build out apis i really enjoy using strappy what's up jimmy b welcome back khalid welcome back sheldon what's up ooh spirus spiros luis one from greece everybody where are you coming in from let's get the energy up in here i love it i am coming in from las vegas nevada um yeah and if you have a chance to come visit we have more than casinos we have some great outdoors we've got great restaurants eddie shang irland jimmy b sheldon from ireland jimmy b texas i just recently came back from texas uh my first time over to where was i austin and waco what's up bruno lucky s seven 777 seven from ukraine is that simone simon from spain welcome holy gholi from uh dhaka bangladesh no name is it possible to pull the database models from an existing database into strappy um i don't know of a way and last time i checked there wasn't a way to do it i think you just kind of have to import it yourself but hoping that some of the strappy team is here in chat uh if anyone is hello and um yeah prisma does a great job with their what is introspection feature where they can look into a database and pull what's out of that database as far as schema goes fabian from colombia kopi love from ukraine liam from canada i love it hello from spain javier leandro from portugal george from athens muhammad from pakistan what's up everybody welcome i love it when we do this this gets me going and i am excited to get here to do this api stuff because uh in our last tech talk which i feel like was yesterday time flies we're in december now our last tech talk was on laravel building an api and we did that with a laravel api we built pretty much like a twitter clone but we added an edit button so um what we're going to do here is we're going to do the same thing in strappy so you can see how it works in the node strappy land and what's really fun is two days ago strappy came out with our big new version v4 i had originally planned on this being v3 but here is v4 so we're going to do it on v4 most of the stuff is the exact same but they give you a lot more power under the hood so we'll talk about that uh king from the philippines faulk from germany daario from germany as well robinson from kenya all right let's get it started uh can we set up the api with our own domain from eddie absolutely you can um you can do it a couple different ways you can deploy it to app platform which is digitalocean's platform as a service and then you can just add your domain to it so you could have your domain at like let's say myapi.com or you could deploy it to a subdomain like api.mymainsite.com so there's all the options you can deploy either way let me bring that out and let's get started so here we have strappy which if you haven't checked it out strappy.io it is a node cms open source headless cms built in javascript and that lets us build out apis really quickly and the cool thing about strappy that we didn't see in laravel is laravel was all code you're building out your database your models your migrations your controllers everything in your code in strappy land you get this really nice uh gui graphical user interface you get a really nice dashboard so if you as a developer want to give your users let's say your team a way to manage content in laravel you had to find a solution you had to build a solution on top of it and there are great options here in strappy it comes built in with the framework which is really nice so let's get started let's just jump right into it we're going to use this npx create strappy app my project quick start and this quick start basically says let's use sqlite under the hood which is a local flat file database that we can use so i'm going to copy this right here i'm going to go over here and usually these tech talks there's a lot of content in the hour so it's a little bit harder to follow along if you wanted to follow along here i would say that this is one of the tech talks where you can follow along because of how nice strappy's dashboard is so if you wanted to follow along go to strappy.io go grab the code right here copy that let's go into our terminal and i'm going to paste that in but instead of it my project i'm going to call it my strappy project so this right here is the folder that you're going to create the project that you're going to create hey bruno that's awesome bruno says uh that has a strappy back end already working on digitalocean and while this is spinning up let me go show you something if you go to docs and you go to developer docs down here under deployment for setup and deployment you go to deployment there are hosting provider guides and optional software guides so if you go to hosting provider check this out we have two four app platform uh for digitalocean app platform and one for uh digitalocean droplets so two for digitalocean and you can take your strappy application and deploy it to digitalocean you can host it on a five dollar droplet if you want um i believe it would take about ten dollars of app platform to do it for your backend plus your database and the cool thing about app platform is that you can add on let's say a mysql database or a postgres database and link it to your strappy application and now you have a production ready api the other cool thing about this is i don't think it's live yet but strappy has pricing page well let me come back to that but let me go to this pricing page for strappy you can self-host it and since it's open source it's free forever and you can use it deploy wherever you want like we said you can deploy to digital ocean or there's a cloud option where not available yet but you can just go ahead and spin up a whole strappy backend from their website and they'll give you a url for your api so all sorts of great options to get an api live let's see let's go back here so after my command is done running so it went ahead it created everything and it actually started the development server for me already and now you can see everything at localhost 1337 admin so this is the local url that you can use to start building out your api oh jimmy b says node is too new what are you on ah 17 cutting edge all right so that's good to note it looks like you should be on 12 to 16 if you're running strappy all right so strappy v4 gave us a really nice ui refresh i think they did a really good job with their inputs all of their entire ui looks a lot better i think than v3 so let's get started chris right here uh last name sev email see cevaleja digitalocean.com that's my full last name i'm just going to do a password one two three don't do that password one two three uh eddie says what did you call your project i called it my strappy project and you could name it whatever you wanted it would all just create a brand new folder with that name so it doesn't really matter what you call it i'll click start and this is your strappy dashboard so what we have here is some really good onboarding so code examples documentation tutorials blog all that good stuff right there and then let's see let me pull up sorry i gotta get my notes over here and what else do we have we have create your first content type so that's the first action that strappy wants you to take so where are we at on time so we are 13 minutes in i want to see how fast we can build an api from here um and still take our time so let's see create your first content type if you're talking about an api every api is going to have some sort of data some sort of data that it stores gives out to users using json in this case we're going to use tweets so create a new collection type and over here you see user is the first one it's built into strappy because strappy comes out of the box with authentication and user and roles and a way to add authorization to your api so we'll talk about that in a second but that is a huge win for building out apis is anytime you deal with authentication authorization it's not fun so let's go over here let's see create a new collection type create your first collection type where's the button to do this let's go over here create a new collection type on the left i'll click that display name we're going to call them tweets api id singular that'll be tweet api id for plural will be tweets i'm going to click continue uh bruno that's interesting so let's start building out our model for our tweets so every tweet should probably have text and we'll just call this i don't know body text actually don't know what to call it let's call it text or content that makes sense you can do short text which is good for this scenario long text is more for like longer things like blog posts i think short text is good because it also enables search on that field and you can go to advanced settings you can set default values you can see re required maximum length if your twitter you're doing what 280 these days uh you can set that to unique so if you had like an email or something that you wanted to be completely unique you could force that so whenever you use the api it automatically invalidates it and look how much power this has out of the box in laravel we would have to build a lot of this in code here we're just clicking some buttons i'm going to click add another field and let's do number for likes remember format we have different types of number formats integer big integer uh we're just going to do integer i don't think i'm popular enough to get up to these numbers yet advanced settings you can do default value we'll start it at zero see how there we go zero required field no maximum value minimum value um we'll leave it right there okay so let's finish so now our tweets has content and likes and i think for now let's leave it there we can always edit this later i'm going to click save it restarts our local server so now we can go over to content manager and check this out we have two collection types right here tweets and users um it's weird that one's not plural but that's okay so if we have people on our team that we want to manage content we would just give them their content manager they wouldn't need to know any of this stuff most of this down here plugins in general is for us as developers but here let's say we add a tweet content let's say uh what's up eddie likes let's do 10. and then we can save this so we have a nice ui to work with our content i'm going to click publish we also have a draft and publish feature in strappy so i'm going to click publish all right so now we have one piece of content that is able to be used from an api so let's see if we can get this from our api so the way that we do this is we have localhost 1337 is our url we can go to localhost 1337 api tweets and check this out it is able to give us data back as if we were an api so technically we're four minutes into building this out and we have an api we don't have our data coming out because of the authentication but we have an api what's up avnish so we have an api but everything is 403 forbidden 403 is an authorization http code so we're saying let's go give access to this user so if we go back to our dashboard let me zoom out we go to tweets everything in strappy by default is locked down no access to anything until you grant it so you have to explicitly grant uh access so we're going to go to settings users and permissions plugin this is a built-in strappy plugin that gives people access if we go to roles we have authenticated users we could add new roles like let's say we had an author user an admin user we can go to public which is what we just used here's our new content type tweet and let's say publicly we should be able to find tweets and find one tweet so a person can see all the tweets in our database and see one specific tweet but they shouldn't be able to create delete or update because they're not logged in at this point what's up alvin good to see you again so we'll hit find and the cool thing about this is that it gives you the api url for this api tweets and find one is api slash tweet tweets slash id so if we have that right there we're gonna click save strappy should have updated our roles and permissions for tweets now if we go back here refresh we're able to see data and we have the first object in our database which is that first tweet that we just created what's up eddie with 10 likes barroos what's up welcome back so check that out it is um when did we start at 13. so it's been seven minutes we have an api we're spitting out data we even have pagination on it we have roles and authorization let's go do one more content manager tweets add new entry let's go for hey there steven uh let's go for 20 likes on this one zoom out so it's not so cramped i'm going to click save and i'm going to click publish actually let's show you what that looks like let's refresh here and our draft tweets do not get pushed out to the api yet so we have to go back here click publish and then we can go back to our api click refresh and now we have two coming out of our api so really really cool stuff uh it took us i don't wanna i'm not trying to bash on level i absolutely love laravel built a lot of things on laravel um but these new sets of tools like strappy like our headless cmss these days they let you build faster apis and that's what i really think is fantastic about this so uh there you go we have tweets we have two of them we're able to access them from our api and we're 20 minutes into this talk and 10 min of the minutes was having fun and saying hey so we'll take a break for a second and uh where do we want to go from here there's a couple things i want to do i want to do authentication i want to do creating a user account and then using that to access the api for authenticated requests i also want to talk about relationships as well but does anyone have any questions while we're here let's take a quick second anybody like strappy anybody thinking about using strappy in their own projects a lot of good stuff in strappy and if you used v3 before this this is v4 um if you used v3 then you probably saw the old ui and this ui i think is much improved on it uh king says a good question how about image uploading from the front end so if you go to the strappy docs here are the strappy docs down here at the bottom there's development plugins down here under guides if you click guides there's a lot of good stuff in here i'm pretty sure a file upload is somewhere in there file upload that's configuring the upload so basically what we can talk about here is if i go to content type builder so let's edit this tweets let's go to content type builder i'm going to add another field right here you can actually change this out to be media so you can have multiple media types so a tweet can have multiple images uploaded to it or single media let's say you want a tweet to only have one image let's call it image let's do single media for this click finish click save so now we have this if we go to content manager i'll go to a new entry we have the ability to click an image right now so let's go to unsplash let's go get a dog classics um [Music] all right this one we'll do oh oh that's right they got bought by istockphoto interesting let's go for this one right here i'm going to save image to my desktop that's fine then come over here upload that image desktop please thank you upload one asset to the media library and finish that and it uses their content look at this doggo and of course doggo gets 100 likes save publish and let's go see what this looks like from the api so if i refresh our api tweets we should get look at this doggo content likes where is the image that's interesting i wonder if i need to restart my dev server npm run develop here's how you start the strappy oh i'm not in the project my strappy project npm run develop okay so we are back and running let's go back here refresh where is our images all right so i am not doing so great on the image upload but it is possible and the docs have an example of how to do it from the api lot of good questions coming in here so let's go through these and then we'll jump back into doing like authentication authorization all right so spiros luis has a great question here can i build a custom endpoint so what is happening here is let me open up vs code a lot of great questions yes this is fantastic because these are all questions i had as well when i was starting to work with strappy there's a lot of power with their dashboard but once you start getting a little bit further these are the questions that come up so yeah let's talk about them so let's see um my strappy project is a project open that up in vs code close this one maximize that one and zoom in okay so when we did that npx uh create strappy app what was that command uh what it did was essentially create a folder on our local machine with this folder structure so this is strappy this is a strappy framework and what's cool is if you wanted to you could do most of your strappy work in the in the file structure in the code so a lot of you are already asking hey the dashboard is great but it i have a lot of questions on can i do like conditional things can i do custom endpoints so if you go to source and you go to api this is the api models that we just created so the tweet that we just created is right here and there's content types there's schema so inside of the schema we have attributes for content it's just type string likes which is integer image for a lot of types type media multiple is false so all of the things that we did in the dashboard corresponds to files in our folder structure and if we go to routes right here tweet.js if we wanted custom routes if we wanted custom controllers or custom services we could add them all here and we could use them to supplement what strappy has already done for us so there's a lot of greatness in the simplicity of the dashboard but when you want to break out and start doing more advanced things you can do that all in the files right here so the cool thing about this is that the strappy docs do a great job of doing use cases for like file uploads of doing use cases for creating custom routes and stuff like that all right a lot of questions so let's see custom logic i think that's what dynamic zones was talking about as well let's go take a peek so if we go into the dashboard right now we're going to find that in content type builder so we can have single type we can have components which are reusable across different content types but let's go to add another field this is where we start we have all of our basic fields enumeration date all that stuff relation and there are components which are reusable parts let's say you had content was a reusable part or let's say content plus image was usable in tweets and in something else like posts you could do that in dynamic zone let's see no spay add a new dynamic zone what would be dynamic let's say i got nothing at this point anybody in chat got anything for me i'm just going to write tests until somebody says something better add components so dynamic zones are based on components it looks like display name we're going to say um i don't know note select the category or enter a name to create a new one um let's just write a bunch of stuff and then we'll see how it works and i will click the text right here add first field to this component and select a field for your component so our new component should have rich text let's do content right here finish okay so check this out this is the dynamic zone that we were talking about um test which is terrible name add a component for content all right so let's save this and let's see what it looks like in the editor pretty cool um this is the first time i've used these myself so we're all learning here together oh dynamic retweets that's a good one julian okay so let's go to add new entry for the tweets add a component to test pick a component so i don't know if i think the question earlier was how do we get this to dynamically show up if something else exists maybe it was back in the content type builder but maybe we didn't set it up correctly but i think this we're on the right track so add another field add a component let's see if we can click note uh let's see let's see if we can edit this advanced settings there's no like conditionals in here so all right that was fun i'm sure the strappy dogs have more on that i'll have to play around with that too that's pretty cool okay so let's see bruno says relations are not populated by default uh bruno do you have a link to that in the docs because but in v3 they were i believe and in v4 it sounds like they're not so maybe we need to do like an include or something let's see maybe you need public permissions on the image field yeah maybe we do oh bruno already wrote it in i just need to catch up on chat populate field so let's go to our api right here api slash tweet slash populate image what do we call it let's go look at our content type tweets image with a capital let's see if that makes a difference there it is okay so we needed to specifically call the api and say get relationships with this populate and down here there's the one that we had uh attributes formats for thumbnail large medium so it gives you all the different content types sorry sizes and it did all the processing for us which is really nice especially when you talk about images are one of the main reasons for slow performance on the web all right thanks for that bruno really helpful let's see what else we can do liam says could you show what you change in settings roles uh yeah let's get to that in a second when we get to authorization and authentication uh taric any numbers on performance i don't have those numbers maybe the strappy docs do it would be fun to stress test though is it feasible to use strappy for micro messaging i know that there was a point where um real time streams were in their api or sorry on their roadmap i don't know where it landed um but yes any sort of thing that you can give out from an api strappy can do really well do you know if stripy supports rate limiting i do not know that uh the docs would probably know let's see how do you edit and use pagination so the cool thing about v4 is that strappy has standardized how all of their api responses look so you're always going to have data and you're always going to have this meta which is pagination for page one page size page count total and you could probably pass in and i don't know the syntax for this page too valid pagination attributes you cannot use page and offset pagination in the same query so what's interesting is i didn't use offset on this one so let's say pages 2 page size is equal to 1. we'll probably have to check the dots for this one so search for pagination all right this looks like it comes from the entity service i want the rest api paginate right here ah here we go so pagination and then you pass it in like that and then pagination for page size you pass it in like that so let's try that right here so let's do that right there pagination page one and pagination size one let's go enter and there we go we have that so if we cha change that to sorry that was wrong that should be one and this should be ten so let's change this to two oh page size needs to go back to one there we go so that's how pagination works but just like that you saw how nice the docs and the search in docs is to be able to do all that all right how are we doing awesome cool so let's see can you set up digitalocean spaces to save strapping media files yes you can if you go to storage is it yeah like they have one like this one is going to s3 so there's another one that goes to google cloud storage digitalocean spaces is a an option as well so just go through the docs and do all that good stuff for the aws um instructions cool uh let's see i was gonna go on and move on but i think this next question is a really good one from adam um how do you connect strategy to an existing database that's already optimized for large data sets um database configuration so under config database dot js you can go in and pick your connection how does it work with existing databases i don't know that answer but um this is how you can connect to multiple different types of databases i don't know if pointing strappy at an existing database would work but um because of just how the data needs to be structured but that's a that's a good question i feel like i'm saying i don't know a lot in this but the cool thing about this is i don't know and the strappy dogs are really good and the strappy team is very helpful their discord is fantastic okay so let's jump ahead send an email real quick on that one they have strappy plugins for email and you can in your code like we pointed out the code right here under routers uh controllers and services you can go in there and write some code that looks like this and send out emails based on api and points and data in your database so all that stuff can be programmatically done from those files which is really nice all right so what i want to do now is talk about authentication authorization and there was a question earlier about what i changed in settings roles so if i go over here and i go to public under tweet for public we are able to find and find one for tweets so if i uncheck those uncheck that and i click save and i go back to my api and i refresh let's just go to slash api tweets doesn't allow us to provide any data to a public users to a non-authenticated user so if we go back and um enable those again we would be able to see data coming from this right there so let's say wanted to create tweets from our api though so what i want to do is take a step back from this because you can't do a post request which is how we're going to create things with the strappy api let's get out of our browser and let's go into vs code and i'm going to use a tool called thunderclient which lets us do requests it's kind of like postman but inside of vs code and i think a lot faster than postman pokemon's gotten slow these days so let's go and alexandra we'll answer that in a second uh see rich next auth i'll show you how authentication works from the api standpoint and then however you can implement it from the front end using like let's say next and next auth i believe next auth lets you do it um using strappy's api so let me show you what that looks like new request so the end point to authenticate a user will http localhost 1337 or when you host it whatever url you have slash api slash off slash local slash register is the way that you create an account and slash auth local is the way that you authenticate an account and i'm going to backtrack on that remove the api it's just slash off slash local and slash local register let's go ahead and register real quick i'm going to do a post headers we're going to leave all that authorization none needed because we're doing a registration body json content let's go for we're gonna say username is going to be let's get somebody out of chat um see i just pressed the button that i don't know what it did let's go for c um email see at ocean.com and let's go for password is gonna be password one two three don't do that okay so if we click send here method not allowed let's see post 2 133 say auth local register that's what i pressed okay thanks king i pressed remove screen okay so method not allowed let's go double check what's going on here is it api slash auth local register yes it is okay so bring that back there is the api in there so now we have registered a brand new user and this is what comes back we get the user object which has id username email provider um and provider local because it's using email password strappy does let you do social authentication as well which is cool and it gives us a jwt token which is what we're going to use to authenticate all of our future requests so once we have that jwt let's go back to our api and let's just make sure that we have created a new user we go to content manager and we go to users over here and there is our brand new user eddie um cool so we have created a brand new user so now let's go say hey tweets should only be visible to authenticated users so if i go to public let's go down here let's remove find and find one i'll click save let's go back to roles and say authenticated users though tweet you can now find find one create update and delete so an authenticated user can do all of those things let's click save now let's go back to our api let's go create a brand new request let's go over here new request http localhost one three three seven slash api tweets i just want to get them all press send did i type that in wrong localhost there we go forbidden let's go to authorization bearer token paste in that barrier token send and now we get the data so authentication out of the box is really easy to do we just get that nice jwt token and it handles it for us let's go do a post api tweets body let's do content is what's up king likes and let's do 100. i send that validation error oh so since v4 we have to format our data a certain way and that's going to be data we need a data object like this so v4 for strap is standardized the way that all requests and responses are made and basically all of them are wrapped in a data object which is really nice because in previous strappy there was a lot of what data did i get back how was it formatted now it's all in the same format so that's really nice click send and check it out the response is also wrapped in a data object all of it coming back there so that is really nice to see let's go back over here content manager we have tweets brand new one that came from our api we have our user still exists there and role is authenticated you could change out the roles so you could have let's say an admin user and then you could change out the permissions for that admin user by going into settings roles and saying this admin user can access tweets and stuff like that so really powerful system to do whatever you need to do in your apis um so let's see alexandria says let's say we make one table name posts and have a relationship with users the api will show all users data to public view so what we're gonna do is i think we can close out this and then we'll do q a so we'll go to content type builder here's our tweets let's drop this dynamic zone let's add another field for our user and this is what gets really cool because doing this in code in sql not the most fun is a relation so let's click relation field name we're going to call this author so each tweet has an author and then instead of tweets we're going to have it linked to the user permissions table and i got to change this back to author now this is really cool a tweet has one user a tweet has and belongs to one user so a one-to-one relationship one-to-many so tweet belongs to many users this would be helpful if you had posts and you had multiple authors writing a single post but for this a user has many tweets i think is the one that we need to use we don't need this one or this one we're going to have a user has many tweets so just these like one two three six icons really powerful stuff especially if you've ever done that by hand not fun so we'll click finish so we have an author i'm going to click save we'll go over to content manager let's do this one and i'm going to change the author to c save so now we have uh this tweet which is tweet number four and you can also see the idea of it uh in our entire list tweet id four it has the author let's go find that in our api so let's go here api tweets slash four press enter forbidden so we do need to go back and update our permissions oh that's the wrong way let's go back to settings user and permissions plugin roles public tweet find find one i'll click save there let's go back over refresh and there we go so the question from alexandra is would user's relationship be available to all public users well i think ideally you would not want to just expose your api um let's say populate author was author right content manager for author yeah um so i don't know why that didn't show up actually but uh yeah ideally you would lock that down you wouldn't allow that to be sent out to anybody and you would just make sure that all of your apis only returned what data that you wanted and the dashboard for strappy is actually really powerful at doing all of that sort of stuff cool so check that out we got through a whole tech talk and didn't even have to write any code and that's kind of the benefit of strappy and these headless cms is where you can build out your content types your data connect to a database and generate an api all kind of out of the box so i hope that was helpful we are wrapping up this tech talk thank you again for joining this is always so much fun and let's see marketplace is something else i want to talk about in v3 there was an extension for uh graphql so you can turn this from a rest api into a graphql api but it looks like the marketplace is down for a second while v4 is getting pushed out uh jimmy b with no code is good code i i like saying that all code is a liability because writing code is one thing maintaining the code is a whole other ballgame and the less code you write the less you have to maintain and to be honest i was not the biggest fan of these no code solutions like i would have been a laravel fan and said use larabelle super powerful stuff but strappy is actually one of the tools that has changed my mind to being a little bit of a less getting closer to no code i think there's always going to be code necessary so i would always try to call it low code instead of no code but tools like this are fantastic i think a lot of uh the market is pushing in this direction and that's that's all good strappy has a whole team of engineers that are incredibly talented of what they do let them handle it right you're essentially getting a lot of work done for you and not having to pay too much for it not paying engineers for it bruno is right yes with strap you get both the code and the no code and you get to use whichever you want which is really powerful especially when you say you want to break out and do a little bit more in the code right here powerful stuff to be able to do it all from here content types it should have the author that we created relation many to one inverse by tweets all that stuff handled just by clicking a couple things in a dashboard eddie says is this version four yes it is strappy just came out with v4 strappy dot io slash v4 great launch by the team fantastic the ui really nice uh liam with a good question if you edit the api code can you continue to use the strappy interface yes you can um strappy actually does a great job of saying like oh if you broke something here server's restarting okay let's see if anything breaks in our dashboard it just said invalidated so it kind of removed it so uh i think in v3 that showed an error but in v4 here it just which i think is nice it just keeps going and kind of just says okay there's an error in that area remove it completely so i think they did a good job with that but the code that you write here where am i the code that you write here corresponds to your dashboard so there we go they go hand in hand honestly so if you have if you mess up here the dashboard kind of breaks or shows errors and i think that's a really great way to unify and make sure that everything's kind of plugged in um let's see the docs let's see authorization role permissions let's see [Music] token usage so when you get into your files the way that you can get the user object that's logged in is context.state.user and what's cool is now that you have that user you can check if that user is able to like do updates to a certain resource you're able to check if that user i don't know doesn't have the certain permissions and all sorts of stuff so you can add custom logic that goes hand in hand with what you did in the dashboard um i paved that is a good question though should we follow up yes i think there's a lot of stuff that we can do with strappy maybe even bring on more of the strappy team and do a joint talk with them but yes i think strappy has a lot of uh popularity these days especially gaining with v4 let's do more all right everybody if we're all good any more questions we're going to be wrapping up pretty soon uh sherry wilson how to integrate with django or any other stuff so django is another back-end framework yeah jack django back in framework in python so the idea here is there's this push of like micro service architecture micro services so if you can segment your application into multiple apis strappy is a great job at doing an api strappy also does a great job at saying look we're an api if you want to bring any front end you can access our data through our rest api our graphql api and use it however you want so strappy can talk to other apis let's say you built an api with django it can talk to that api go grab data from that django can grab api django can grab data from this strappy api and um either one of those could consolidate your information and send it out to a front end let's say react view next js whatever but yeah in both of these cases you have database you have an api you're just sending out json data really this is all your api needs to look like so yeah uh eddie will this video be available on youtube or is it download how long until it's available the cool thing about streaming on youtube here is that it's available immediately so if you come here to the digitalocean youtube channel and while we're here if you did enjoy this video please hit like and subscribe it lets youtube know hey they're making good content chris is okay as a person and we're doing good stuff so really appreciate it if you could and let's see yeah the video will always be here on youtube not coming down ever or at least until youtube comes down which seems like never support organizational access for a sas are you talking about more authorization type rules um so there's roles here and then you could apply certain roles like let's say we had an admin role for super admins or something then admins by themselves could delete tweets this is probably what twitter did admins have the ability to delete and edit tweets but all other users so let's go back they probably said all authenticated users no way they're deleting i guess we can delete no updating no editing tweets and public users for sure can't do either of those so there's that as far as roles and then there are more fine-grained things that you can do in your code when you want to add in more fine-tuned permissions fiddle says why use strappy over express.js and make your own api because we did this entire api in this past hour and we didn't write a single line of code and i think to do the same exact thing in express would take a lot longer because you you talk about authorization authentication roles and permissions um filtering pagination all that stuff comes out of the box with strappy in express you'd have to pull middleware you'd have to write that yourself what we did in one hour i think would take you at least two days in express oh multi-tenancy organizational access i am not sure aside from the you know the quick answers saying everybody gets their own strappy install and the other than that i am not sure on that answer i wonder if the docs have anything on it for sure the strappy team support is fantastic i think that's why they're getting so much love is because of their support uh there was a question i missed can strap use typescript instead of vanilla.js i don't know that one it seems like a lot of the code base is in just javascript so i don't know if they do have a typescript version uh yarn any advantage over npm i think these days they're pretty synonymous yarn and npm yarn did a great job at pushing npm into adding new great features but personally i use npm i know a lot of people use yarn they're all good cool all right well jimmy thanks so much for joining alexandrew uh they don't have i think are you talking about multi-tenancy um yeah let's go last thing i know i always say a lot of things strap your road map the team is fantastic at doing transparency for the road map they have a product board uh here so it looks like priorities oh these are under consideration planned is data migration across environments in progress in progress for development bulk entry creation testing launched launched v4 those probably these two are probably their big ones under consideration cloud hosting platform and you can go vote on these for the ones that you want to see the most let's see authentication providers is in there html wysiwyg editor multi-tenancy is in the request so it looks like they don't have support for it yet oh and typescript there we go typescript has the most votes graphql subscriptions for real-time data that's also in there so they have a busy year ahead of them it is exciting stuff when you talk about what we did in one hour and what we still could do so you can build your api in you know less than an hour and start building your front end because your users care about your front end right or your users care about the user experience so all right let's wrap it up here i know i've said that like 10 times now thank you everybody for joining really appreciate you again if you could like and subscribe down below really appreciate it uh thanks so much for being here this is my last tech talk for the year we are going to come back strong next year with some great new content sounds like strappy is high up on the list of what people want to see and yeah thanks so much for joining and i'll see you in the new year have a great rest of your year wow thanks everybody
Info
Channel: DigitalOcean
Views: 16,101
Rating: undefined out of 5
Keywords:
Id: hSEZJqacL0c
Channel Id: undefined
Length: 61min 30sec (3690 seconds)
Published: Wed Dec 01 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.