logo

NJP

Inside the Barrel Episode 8 - Setting up and using now cli like a pro

Import · Jun 29, 2021 · video

carol episode nine uh where john and i talk about back the behind the scenes of consulting a little bit about cask we hang out with friends and we like to try to solve some of the problems that you run into today's episode we're gonna talk about the now cli um kind of walk you through setting that up because it may be a little challenging for people that haven't used node before and we're also so so thankful to have a special guest uh ashley is on our call today ashley is a developer mvp she writes tons of blog posts on ashleysn.com that kind of dive you into if you're an admin or a developer and she does a lot of the hard work of finding all the problems that you'll run into so we're really really happy that ashley could join us today awesome thank you dorian um yep i'm ashley snyder i'm a senior servicenow developer at virginia tech um i've been working on servicenow for about five years now a little over five years um in all different areas like itsm csm platform development all that um and i you know i really enjoy doing my blog a lot of it it's just me trying to figure out stuff like you said or i can't find stuff in the documentation and i'm like well if i can't find it it's not there so let me write this down so i really enjoyed doing it and sharing it with the community and i'm excited to be on this podcast with you guys today cool yeah john john and i like to ask embarrassing questions um sometimes but uh this one won't be embarrassing but so if you were on vacation right now and we could do this podcast anywhere where would we be oh man um i'd have to say the bahamas i know it's like a cliche spot but not being able to really go anywhere last year i just want to be underneath like an umbrella in the sand yeah is it too early for mojitos it's five o'clock somewhere dorian five o'clock somewhere yes um awesome so let's let's kind of just dive into it um if john wants to share his screen and pray i get my transition correct uh what do you want me to share a terminal or a browser what do we have let's start with the browser because i think we'll go to the store to show people about the binary first all right sounds good okay here we are where are we after or where are we going uh so let's type in like service now cli and then maybe store i don't know at the end of it and hey so that sure we'll just find it from the store yeah so for for people that don't know um servicenow has two different ways you can download their their cli and you may be asking you know what's the cli for um so the the command line interface is normally uh in this case right now used for either building components in agent workspace or building components in in ui builder so and am i missing anything actually those are kind of the two main cases you're right cool put them either or um and and so essentially if you compare to the previous versions of servicenow if you wanted to build something you know custom in the in the portal you would use their you know interface that was in in servicenow servicenow has taken that out in order to kind of use some of the best features of the node and servicenow platform and so that's why they've created this command line interface allows you to use like your visual studio code and then you know build and deploy your your component from from your computer so uh for those that don't know here's where you would download your servicenow cli it's just a binary that'll you know go through some installation process um so if it'll come in a zip file that john will magically have on his computer or download it for us uh i think i have it downloaded okay cool yeah um you do need an account so if you don't have a servicenow developer account you will need one in order to download this one um so what kind of what kind of walkthrough if you have you installed it yet john or do you already have it uh no i have not um i can i can share that if you want yeah so it should come in a zip file and then there should be three different ones a linux and windows and a mac so if you just want to to double click the mac one and then yeah yeah i will it just doesn't uh it doesn't like it because it's not signed if you're on a mac um allowing gatekeeper to get through that i don't know about windows but yeah let me let me close some things um and i'll just share my screen since it'll be or i'll share my whole desktop since it'll be so much easier okay trying to do yes i know i do remember you have to go to security and so once you open it the first time you can then go to security and privacy um using like spotlight or into your system preferences and then there will be a button there that says open anyways or you can hold down what is it so i have a windows keyboard on my mac but if you hold down i think the left control and um click on it you can get an open let me change my share here all right we'll move me here our pictures up all right so i i got it to where it'll let me open it um and we'll see what it does if it actually comes up or not maybe it won't i would go to security and preferences or it's trying to do something i don't know oh yeah cool click next you obviously sell your soul and i mean let me speed through this oh look at that so quick wow congratulations so you want to open up terminal now and and type in snc hey it worked so that is way easier than the cli one from npm yeah but since since we want to break john's computer should we try to install the the servicenow cli one as well uh we can i think i might already have it installed i don't know but we can go through it well so let's give a couple pro tips here um so there are some prereqs here you do need node um so i'm not one to install node like just out of the gate because you'll notice that you'll constantly have to keep it updated and having multiple versions of node if you ever needed to test something in like node 10 versus 12 versus 14 is a pain in the butt so we're not going to install it this way john so the one that i like to use is called nvm it's called node version manager so if you want to type that into google you can it'll bring it to like a github page that you just have a bash command and it should be yeah like you can click on that one it should bring us to a github page and [Music] yeah awesome so then scroll down here and there should be about installing in the readme and it should just be a one-liner so yeah that curl command you want all of it including that because it'll pipe it to bash the first one would just install so nvm is if you've ever used npm which we will use here is for node package manager this is just node version manager so what's nice this will install nvm and it should put it in your your bash rc or your csh rc um if you have it so you should be able to type nvm to make sure that it it caught itself in what nvm stands for no version manager yeah enter so it didn't find it right so can you um cat your uh or actually sorry it just says you need to close and open it so like restart terminal and try nvm again oh um can you cat your bash rc file or sorry you're using zsh right are you using bash you're using bash okay can you uh can you cat uh you're gonna have to you're gonna have to walk me through yeah i got you i got you uh tilda dot slash bash rc uh one word no oh sorry mix i mix i mix the period in the slash sorry okay it's in there um can you can you type in source and then that same path again the bash rc uh you want the tilde yeah the tilde that just goes to your your your home folder yep i seem to remember something about that way back when i was using linux but and try nvm again yeah all right cool so nvm now is essentially just your your version manager um and so what we want to install is probably the latest version of lts so the most common command i use which shows under these examples is nvm install dash dash lts what was the last p at ltf uh sorry yeah lts yep people may not know or not work with this is a lot what does lts stand for uh long term support so this is installing you know lts version 14. so every two versions of node is their long term support so they're actually probably on 15 by now but the long term support is uh on even numbers so until they get to 16 you you would want to stay on this and so now what you can type is so what's it what's probably cool is if you typed in node space space dash dash version it's probably not going to be 14.17.1 oh it is okay so you were already using it but um what you would do after this is type nvm use and then dash dash lts sorry nvm nvm use dash dash lts yep so so now this means it's switched to that version so currently if you do anything right now you're using that version what's nice is if you ever needed to install so like let's say servicenow comes out with some uh the ability to use something that's only in 16 instead of 14 you could then instead of trying to uninstall 14 and reinstalling you know 16 you could just nvm you know install you know version 16 and then switch to it so that's a really nice way to to get to to easily switch between node versions nice yeah cool and so with that it also installs npm which it said when you when you're using it so we're kind of ready to go to the next phase of just installing the the now cli so there's a couple couple ways service now tells you to install it as a global and that's probably because they people just probably won't know how to use npm or won't be used to it i hate installing npm modules as global especially when they're massive ones that you don't even know all of the information about so what i normally like to do is install it inside of a folder um so if if john you want to kind of create our first where our test project is going to be so you can name this like you know first component or something like make a directory mk mkdir and then create a directory nice and let's cd into it cool so servicenow would tell you we first need to now create a project um this is now going to be our project but um for us getting the um the the cli installed here you can just do npm install um servicenow at the at sign service now slash cli and you need to install before it yep and it's probably going to yell at us that we don't have nope cool npm is going to handle installing it in this folder only um and so what the difference here is if you installed this globally you would be able just on your terminal like on command line type in um i don't actually know it is it servicenow cli or is it i don't actually know what the command is what you don't know call it or to use it because it changed to use it yeah so like um the quebec commands start with s and c but the previous commands started with now like cli okay now cla cool yeah because so that when you still install from npm it should be now cli still um and so it just didn't blow up on us we're still good all right yay exciting um or not exciting it came out with an error created no such file okay yeah so can you type in a ls first like that should have okay so it didn't actually work because the reason it didn't work for us is um we can you type in npm init sorry we probably should have instantiated uh a space in it which will instantiate this folder yeah um okay just press enter a bunch of times it's totally fine this is gonna get over in anyway so nice yep and then now run that uh cli command again yeah that one so look at all this fun we're dealing with npm yeah see this is as someone who has touched linux in a you know a long time ago this is the kind of stuff that messes me up when i go to try to play with it is like i'll get stuck and be like where's where's the answers somewhere in the documentation where there are none and i'm like well i guess i'll do it later because you know you get stuck and you're just stuck you know you gotta either go jump on um sn devs and hope somebody can answer your question or you find a dorian out there or nationally and say hey i am stuck how do i get through this for me when i first started i was on a 2014 uh macbook pro that of course i had done all kinds of things too in the last six years who knows and uh just error after error you know i had to change permissions like all this stuff that i had to like work through in the community and google different errors and stuff i can say on like newer computers if you haven't messed around with them a lot it is a lot easier but for me like yeah i went through that whole experience the first time doing it it took me days just trying to figure out how to get it installed on that computer yeah so i just slacked you john because the error we're getting now is you don't have xcode installed so yeah so you're going to need to install that this is a one-time thing but if people are trying to use the cli this way they're gonna get it and it should have popped up something on your screen which you'll have to accept uh well it said i've already got uh oh so yep i got you so what we're gonna have to do this command there isn't an update it's only a remove so so go with that one all these it's commands magic it's our magic oven just like on the cooking shows oh no uh on those cooking shows where they're like oh we'll put this in the oven and then magically it's it's done yeah most of the time npm's decently good at and now run that install one decently good at telling you what the error was you just need to find it um and in this case if you went up a little bit in his logs it said like no no xcode detected and pretty much what it means it's like no modern version of it um it's not going to take six hours but um in the meantime i think we'll we'll switch back to um the snc one because there's still some setup if i'm uh i'm not mistaken that you have to like connect it to a instance before you can actually use it is that right ashley yeah you do and do you know if like you can just fake it like you can just put any url in there because like do we do we actually need it connected you know every time i've tried it i've gotten some kind of error if my instance wasn't you know up and running um because you do have to authenticate with your username and password so that's how i kind of reduce errors and just make sure i have my instance logged in first but i'd be interested to know okay so we'll we'll try a fake url first but we'll make sure his instance is up oh great you don't have one that's it's even better um because it'll be really fast to get up yeah faster than waking up right yeah totally cool so it looks like it installed xcode so we can while that's going we can switch back to your terminal oh no i didn't almost oh so close it's not my my max not that fast yeah it's okay we'll probably run into some more errors anyways for the cli i'm glad that they went the binary route i think that's going to help people a lot um but i'm excited that you're gonna have to change your admin password on this at some point yeah as soon as i log in it'll go hey change that no i do like i do like how they they've updated it so you don't have to remember like it just opens it with the password anymore that is nice yes i am definitely i don't actually have to change it well now someone else could log in with it right because you just broadcasted it um cool so so let's go to the uh back to your command line now that that's up you'll need that url at some point um so did it finish did it actually finish yeah so let's type in snc again just while we wait um and i think it is the i don't i don't remember i can configure looking for the command yeah what's the command to because if we did the ui component is going to yell at us so i don't want to just try configure oh configure set right configure space and then select our either configure profile set i like the word profile let's do profile like that yeah so now it wants a host yeah yeah you're good you get that's where you put in that one well let's put a fake one in first uh just type in a random dev one dot service now and the only reason oh well that's not a valid url or that put a dot before the inside the barrel yeah that like make it like an actual looking oh okay try that again i was just gonna say just change the url but uh that this works yeah make sure you get that https um in there as well or it will yell at you you can't just start with the the name cool try enter basic and then foobar and fubar uh um probably json i like it yeah that's what i did on my i i'm sure there's reasons why you use the other ones but i think it's it's not like fake urls that's okay though because what we want to try is the ui component part right so so snc ui dash component which i think it doesn't always isn't always on right like you'd have to install that sometimes yeah so i found that it's like it's an extension that you have to install first before you can use it so i'm assuming they may be adding on to this later because i know in the now cli it just came packaged you could just go ahead and do what you needed to do okay and so um i'm just quickly looking to see how someone would install that one um so we can okay so normally what you would do since i think you've already done this john is snc space extension space add space dash dash name space ui dash component wait wait extension add what uh uh magic oven oh i i have hot corners and so when i switch screens all right here we go yeah so if if it isn't installed like if you don't see it when you typed in snc on available commands you have to do it this way which is interesting because behind the scenes it's just installing an npm package so very unique design they chose man xcode took way longer for you than it did for me told you i don't have a speedy mac not one of those i9s anyways or m1 you should bring it up with your employer right hey maybe maybe we can do something like if we get like a thousand subscribers they'll buy me a new mac i like it i like it maybe they'll just give me a new mac um cool so now that the snc component is installed if you typed in snc it should just show up on your available commands cool and so you'll see that it's there awesome so i'm sending you some more oven code that i just got from the docs um and you can't just press enter on this one but it at least outline you know what we're trying to do so essentially imagine you're in the world where you have your environment is set up correctly it is set up correctly if you're just using the binary in our case we are also trying to use the now cli so it's a little bit different um but the first command that you'd want to run is after you make a directory and you see or you cd into it you would want to create your project yeah it's done so these this is the command for the project creation a couple things about here i normally like to keep the offline tag there so and which is weird why you would need to connect to a host um so we're gonna test to actually see if that works the only thing that is required is the name i'm pretty sure um and so for the name it's actually a npm package name so you would normally want to do like an at your company slash the name of your component does that make sense actually yeah okay yeah they give at my org slash movie quotes it's like a example yeah and and that's because in theory you can publish this to mpm and other people can use it and so there's a lot of them that servicenow has already published that allows you to pull in one of their components and use it as a sub-component within yours so that's kind of the the thinking behind that so we're going to see if this works with our invalid host dang so so yeah so this is the reason i didn't actually like the binary i don't like the idea that i actually have to connect to something before i can start building my component like if i wanted to test locally it kind of breaks one of those principles that you should be able to work completely offline but that's okay we did install xcode now so we're going to try running that npm command one more time john and see if we could get that working for people this one yeah because i do know for a fact on this one you could actually get everything up and running locally without connecting to uh an instance which is kind of nice so we're going to pray we don't get an exit one john because nbm is going to love us what was the first language you learned in college john well in college oh i don't know probably um classic asp maybe before as net i got the goosebumps just hearing that but then i i actually went professional with php so in fact i even went to i went to a uh an expo in san francisco a php what was it php's big conference conference back in like um early 2000's somewhere wow i think i was still a kid at that time [Laughter] uh cool but this actually succeeded look we only got a warning that something's deprecated that's beautiful um and um the next thing we need to install is keytar because we know that's going to give us an error if we don't have keytar so npm install space keytar also i don't know why they didn't put that as a dev dependency but i will let you know that it would give us errors so just install keytar after this so again what we're trying to do here is just install it locally so that we can we could potentially just use it within our project or within this folder so it doesn't install this so that you use it globally um but if you didn't want it good well i was just gonna say so you would end up in doing these installs in any directory that you're gonna build out of yeah if you wanted to try to if you wanted to keep this contained if you if you don't care that it installs it on your path and you just want to be able to call it from global you just add that dash g at the end of it and then you would then get it as if it was a binary essentially so if you do an ls now and if you want to cat package.json or we probably should open visual studio code soon press enter so you'll notice here that under your dependencies it added the servicenow cli and keytar um so that means that in this project we have access to it now what most people would think is they could just type in now the that now cli command on npm um which i don't remember so if you wanted to type in now dash cli and then yep and press enter this won't work but or you installed it globally so it will work probably at some point i did um that's totally fine um what what i guess i would just show if you are watching this and you don't have installed globally this won't work it'll say command not found what you need to do is actually add it to the script section of your npm package so what we're going to do is if you want to open in visual studio code or use vi what's probably easiest if you want to open this do you want to open the folder well you should have already created that folder right um sure yeah well it was already created so we should we should find where you actually created it oh there should be a folder somewhere yeah if you i see what you're saying let's see where's that gonna be probably at here if you go to terminal you could type pwd but um it's probably under users and then it should be inside the barrel somewhere there yeah there we go open that where's my open there we go don't you love that it defaults to icon list and not list i don't even know why there ever is an icon but well it should know what kind of directory you're in and just kind of go with this one i think it's the top one john all the way at the top there we go cool awesome so let's go into that uh packaged package.json so you'll notice here where it says scripts and it says test so um you're going to put a comma after that one and press enter and then like pretty much follow that same format but we're gonna name this like um uh now cli or now we could do now and then colon and then the command that it's gonna run in this is going to be the now dash cli right so i'm gonna have to pull up docs and then like that that's all you would need for in this case um yeah so then save this done okay and now let's go back to your terminal so now if you type in npm run now it should run the cli from this directory yeah which it it it worked it just didn't expect a a one error code right but notice here like this is again this is just an example if you don't want to install it globally how you could utilize it just within your project um so if you're working on a a space and you and you want to keep it locally to this folder and not have it anywhere accessible outside of this folder this is how you would do it so we're going to stop there for the local stuff but like i just wanted to make sure that somebody knows that you know this is one way of stalling installing the cli from locally we're going to use the global one in this case going forward and we also showed the binary as well so you have lots of different options to get lost in and hopefully things work for you cool so so let's go and use the the now cli to create that project um since you have it globally we're gonna actually cd out of this folder and just create a new one um just so we don't mess with any of that i don't want to run into it city space dot dot yeah and then make a new directory and cd into that one cool so now if you type in now dash cli i don't actually and then it was project i think it was and then i i don't think you'd type dash dash project in this case another frustrating part is they didn't make their cli the same as their binary so very you really have to choose one or the other so project and then dash dash name and then name it and then dash dash offline you'll need a slash after that at sign you can't just name it at the scope oh sorry not sorry after the scope name so in npm you you scope it with the app and then a name and then you you actually named this individual package foo bar first component yeah whatever you want it's gonna say don't get me caught up on trying to name stuff that's a huge time suck for me all right now if you press enter we're gonna pray that this works one dash [Laughter] nice again the beauty of uh well i think that offline is must include at least one dash oh offline is double dash yeah they're both double dash project dash dash name well it says there must be oh after scope so you have to include scope in this one so let's include scope oh where's that is that just another oh okay i see so we don't need that but we do yeah no no that that that was the issue i think that was that we don't need scope on it no i think i think it need must include at least yeah i think inside the name you need that dash yeah weird it's it's probably an npm thing um but or it's a service now oh no scope must be defined can we do globals uh no so you do scope and then oh yeah i think you could do global um but the the problem is is this is the custom scope that your your app's going to be named so you can't use global in this case it'd be like x underscore you know whatever this is only if you're working offline because it needs to know that application scope name if you're logged in in creating a project um with the binary or the now cli the install it'll just create it for you automatically oh nice okay so just underscore foobar that or uh well i think you need one more right i think it's two underscores yeah there you go all right and the good thing is you could change this after the fact so before you deploy when you're in offline mode omg so that just created a bunch of things for us so on the left hand side if you open that one now remember that we created a new folder so that we didn't mess with that yep so just go up one oh yeah that's okay yay awesome so some important things here is uh the now cli json so just kind of click on that um i lied not that one the now ui so um this is where there's a couple things this is where you can change that scope name that we just discussed if before you deploy um it's the name of the component that you're creating that foo dash bar and then in the inner component if you ever wanted to pull in another component that is installed in your package json um you can use that inner components as well um did i miss anything actually i would say like definitely do this cause you see where it says label my component if you just deploy this up in ui builder you're gonna see my component so like you know instead of seeing that 15 different times just get in the habit of coming here and naming your component in this file alright so we'll name it john's component beautiful yeah and then um are there other i think that's the main thing and then the package json is where um if you if you were to install another component and they have a few of them here right like that in those dependencies like those are the out of the box ones that they give if you wanted to use any of those as an inner one um you would you would select it from there or you would you would npm install it and then it would show up here so yeah cool so we have a component let's try to test this component right so i think it's like mpm develop it's been a while yeah hopefully you have nothing running if you oh sorry mp uh sorry uh now cl now cli develop and i'm assuming you have nothing running on port 8080 or 8081. sorry not that i'm currently aware of cool so so if if you did have something running um those all look oh we so if you ran this what essentially what happened is we didn't after we created the project we didn't run npm install so if you want to run npm install that will install all the node modules that you need yep so i'm glad we're getting through those errors yeah and so for the now cli develop it it gives you a couple options to like provide like a port if you want to default open a browser so it gives you a couple different options and i guess we can we can make that easier so this is part of the reason why like installing stuff globally you just install so much on your computer that uh it scares me that no that's that's the one thing i'm not happy with mac about is like you install stuff and it's just like where did it go like windows you can at least go to a directory and find it and be like oh here it all is but max just like yeah i'm just going to put it places and you'll never know if you find it yeah the good thing about applications though um totally off topic but if you went to your applications folder and you right clicked on an application and did um show package contents it actually shows you all of the files that is related to that application yeah that's why when you delete that application it deletes everything related to that other than like path stuff but um so that is a a tip that if you ever wanted to reverse engineer something you could go to package contents of your application and look at squiggly code forever all right we're getting there look at look at this beautiful all this thing you don't ever have to worry about right i i love how verbose it is on like it'll tell you what's going on but the problem is is like fixing any of this is like like out of this like out of the scope of any developer should have to deal with and it's like a gift and a curse like if if you think of the java world where you'd have packages it would never really get updated so it would always once you compile it it would work and you wouldn't get a bunch of warnings the mpm world and node moves so fast that like there's constantly new packages and new updates for security reasons or for new features and they're rather than it just being one major monolith it's all of these little packages so it's it's a gift that you minimize dependencies and things but it's a curse because you deal with constantly things like this yeah so ashley virginia tech where is that located so that's out of blacksburg virginia but i'm actually working remotely out of raleigh north carolina oh okay because i used to live in virginia and florida so i've been up and down that east coast quite a bit when i was little yeah but i was up in northern virginia by uh so i started we lived in winchester and then moved to reston so we were near dc have you worked in edu education like a few of my relatives with the draw and i even get it out here people be like you have a southern draw and i'm like well not nearly as bad as other people yeah i did i worked at um the university of texas at austin actually was my first service now job oh cool yeah yeah my first service now job was actually university of california san diego so i definitely come from education as well yeah it's a really it's a great way to like you know it is education but like it's a great way to learn like seriously because you know they may not have a lot of resources or stuff that you kind of just get thrown in and it's like feet to the fire kind of learning totally yeah yeah there's there's always more work i found when you work in uh education space mine was a mortgage company that's where i cut my teeth on service now so but i i have done projects for a university and uh so i i have been in that space before in fact i built a scanning app in the platform because they had a lot of inventory they were trying to process or trim or you know efficient make their process more efficient so i built them an app that they could just go in and scan stuff and it would add it would check to see if it already existed you could add all kinds of fun it was a good time that's cool that's a fun project oh my gosh we we're we're going to get a success oh yay accessed only 28 000 vulnerabilities no big deal uh cool so now you can type now cli space develop and we're going to add a couple options here we're just going to add the dash dash open which is just going to open your browser so yep press enter and if everything worked as promised don't worry about those promises that's not an actual error just a warning i think i think we're gonna get successful no oh it's already in use some something's already running on 8081 uh which could just be like a virus scanner or something like that so we're going to run the same command but we're going to change the port so space dash dashboard and we're gonna do 3000 yeah so like you guys can see like if you if you think that you're just gonna get on like the developer site and go through the component course and start jumping like this i i can just like you know a really in-depth board game now you know you're gonna spend a couple hours reading the instructions first before you you jump in and start doing things so just kind of like mentally prepare yourself for like your first couple hours is gonna be the setup on this before you jump in and start doing components yeah yeah and and that's where i think we're gonna servicenow is gonna lose people is in that couple of hours trying to get it to work because they're going to get frustrated and be like oh my gosh this why is it so complicated yeah yeah so so it looked like it loaded our component though so we i know we only have a few more minutes so let's go and change the hello text to actually show um so if you go to your visual studio code if you go under source index uh foobar yep so this is what's loading and nothing is in that div um so i'm trying to think do we want to spend the time so i'm just going to give you a quick overview of like what the heck is everything here um so where it says the import that's where you're essentially importing other files um from different parts of your application or from different parts of your node modules so that's what the imports are for um definitely a javascript thing very similar to require if you're on older javascript the view here is the actual thing that that your component is going to return so it's normally just a return of your html um so it it takes in a couple functions that allows you to or a couple variables that allow you to manipulate things like your state and your updated state and then the bottom part is where you're actually creating your element and providing it the parameters it needs which is creating your component with the correct parameters that it needs there the developer course does go into a lot more detail on what those are for but those are your three different things that you'll ever need what you'll need to worry about for building your component there are ways to build functions as well after that but for for most of your use case those are your three that you'll need yeah i did want to mention too like you know with the import and even um in the view section so servicenow on the developer site has the section four components um and it will tell you how to install them if you want to use let's say that you wanted to use a button in this um it'll tell you how to install them it'll tell you you know you have to put that code in your import section um you know as a dependencies you can import that button and then it even has a playground where you can you know enter some common parameters and stuff for that button and it'll give you the code that you can just copy and paste into your component so it's definitely worth going there and playing around the playground so you're not doing all this from scratch you could also go to this link that i just sent to john that he'll open up real quick um that has this awesome tutorial on uh how to to install some of those things specifically around like a button or if you wanted more information on kind of what we just went through um there's this awesome blog that ashley wrote um that kind of goes through it and she has a whole section around like modifying the index.js.js so yeah so definitely check that out like it subscribe actually does awesome cool stuff so back to our component uh yeah so you put something so if you actually go back to your browser where you had the it should have just up if you saved it then it should have just updated it so servicenow does hot reloading so if you just modify it you'll quickly be able to see it so again this is all local um and you know quickly most of us most of the time was set for just setup so you we essentially talked about how you get set up globally you're the now cli which i think is the the hardest to do or the the project based ones the hardest to do then globally for the now cli and then you know if you want the easiest setup and you're okay with connecting it to your instance first then setting up the the binary is is the route to go so i think we could stop sharing john and kind of well you know i gotta say i wanna do this again i wanna get actually back on here and do a part two to actually like build something instead of spending the entire time setting up yeah well hopefully this is going to the playground you know import some components and stuff in there yeah and i wonder john if we could take like one of the problems or one of the things we've built in portal like for a client and then just see how far we can we can get in a component even if it's not reusable ideally your component should be reusable but if we could you know build something static that does some cool functions or does something that relates to service now i think that would be fun yeah yeah but now that you're set up now you can get a new computer and do this all over again yeah i can say oh i broke it installing all servicenow stuff i need a new one yes yeah cool all right well i just want to say thank you so much ashley um i hope it was fun-ish hopefully you learned something too i've learned that setting up dev instances of anything is just painful um but this one is actually easier than i've seen in the past like only an hour right we were able to get you know john set up that's better but we also knew what the issue was oh yeah we had morgan and ashley walking me through this so for anyone normal it's like a six-hour process i'm sure of it yeah yeah google is your friend the problem is is this is so new that there's probably not a lot of googling that's gonna help you um the developer courses are definitely the best bet on now learning um if you do get stuck they do have one on the now cli that's different than the binary stick to the binary get it connected to your dev instance you'll save a lot of headache so cool all right thanks

View original source

https://www.youtube.com/watch?v=bhE3hRI3GbM