NestJS: Project Setup | Blog Project V-01

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi and welcome to the first video on this channel this video series will be dealing with setting up a blog project with Nestor s and angular so in the backend we are using Nest Reyes and any fraud and mainly angular so the first video here is about setting up the project and especially the API so f nest risk we will use some things like Nestor s get lab Postgres database environment variables in this video so let's have a look at a structure of this video and following videos in this series so at first we'll have a small look at a video outcome then we will write a user story for this outcome so we are a little bit like scrum or Kanban where we implement a single user story but of course in a very easy easy way so it's maintainable for one person like me and answer what do you want to get to long after we wrote a user story we'll start with the actual implementation so in this video setting up wicket and wicket let project setting up our nest API connect the VIP I to our Postgres database and use environment variables we'll put a length a fire and afterwards we will have a look at the story and look at the implementation and then we close it throughout this whole video there will always be some hints displayed like here and if you want you can just pause the video and read them or if you want you can just ignore them so they addressed a bit a little bit of additional information so let's start so this is what we created in the video we have here our blog project with Rick me and our back-end API set up with nest Chris we have our environment files that we can use to store event sensitive data and it's already being used to store the connection to our Postgres database we're just working and here you can see it's already started and we met our get route so we are seeing here on localhost 4000 had a world and we are connected to our database also we have set up our github project and here you can see our code and we have some basic information in great need for it so this is what we will bid now so let's start with our first to do and first we want to write a little story so we have like a little bit of a workflow like and Kanban or and scrum where we first write a story and then we implement this story and later we have to check against it if they met all the criteria that was mentioned in it so we have here are four lines backlog which later will help all of the tasks we have to do for the next steps that we are doing doing that we are actually implementing at the moment and done if something is finished so our first to-do item would be setting up our block project and now we can give it like some a matter or some information to it so we can write it as a story and we can say as a technical lead I want the project to be properly set up so we can work in the next stories with it then we can give it some acceptance criteria so we can check later if we fulfilled everything at first we want to use get and get left so we have like a warning system and we have a remote repository where also you as fewer from the video can download the code and check it out and run it on your own computer then our API should be set up with nest trainers and we want to add a Postgres database to our project we want to have an dot F file so we can store on our environment variables there for example we like I can have like some stages like environment plot production and the last thing is the API should say hello world so that we can see that it's actually working so now we can save it and since we are now starting to implement it we can move it form to do to doing now we want to have our repository and good lab so we can store our code in it and work with it so you already see I have created a public group YouTube public where I can end all the projects that we are creating so the first project is block and it's stockist also block and we want to make it public so you can also access it and we're going to inif light the repository of the readme so we can write at there are some information that you have to do to make this code working or some different information and now that's here we can go it with SSH and you have to remind you it get on your computer I already installed it and if you want I can also make a different video for it so I have my folder here so I'm in my github projects and then in my YouTube public folder and here I can just say git clone and use this link that I have and then we can see here had created our block and you also forgetting we have our readme here now we can trick or now we can first the CD into it into block and now we want to create our back-end API with nest Reyes so the first thing to do would be set up the basic chemistry as project for this we use vanessi CLI and I already installed it and we want to check do we have the latest version whether it is seven point one point two and yes we have it so with nest - - version you can check this otherwise you would have to upgrade or install it first we can make a separate video off this so now we can just use to CLI am to say nest new and this is our API and now we want to use NPM and now we have to wait a bit till it's finished so some further information would be if you have the chance or the possibility if you're using a tool always try to use the CLI cause it always creates something based on Beck best practices from Bari yeah very good developers so you can just profit from it so now we see that nest phase project was created and we can check if it's running by going into VAP life we can also transfer our folder here and we see block once created and we can now open it with wood studio code so I'm using kit inside our code inside us here and here you see in our plot project we also have our API folder for nest yes and now I'm using this terminal here so it's easier to follow and we can see the into the API and then you can see here we have our package countries and file which has all the comments that we will need from the development and for the running later in production so we can just say MPM run start death and now it should start on local host port 3000 and you can see it's starting it started and it mapped our get route so we have here our basic route string which returns get hello from the service so to attend had a water we can go into your browser and to try and set a word so now we can cancel this we want to for further the next points that we have written down our trailer services connect our post quest database for this we need some packages from nest Reyes and the first one will be the convict package and this is used for a configuration and there we can use the processor and globally and we can store it in order n files so we want to use this we could just say npm install safe yesterday as config and what this does is it saves our dependency nest reyes config this module what - - save into our package cut race and so we will find it here now no stress on the dependencies conflict so here it is and another package that we will need this our database or type or M package to connect to it and here we don't want to MySQL are fun to use Postgres so we install this and the possible presence blimpy tree the NPM package so we went want to add all for you so let's just type or ahem but I for ahem it serves and phosphorus this will also be added now to this dependencies we can now start by importing them into our add module and first you can use our config module for route and roughly you should for it first and let's should be from at nest yes config and we also want to import our type for EM not here and this will also be from nest Reyes type Wharram service pollute well now take some options one option mrs. vs global because we want to use it everywhere and we also want to use our type or Emma module and we are also in our root of the project and not on a feature cause the next video we want to add our user feature module and there we can then connect our type of em module for pizza but fifty cents versus the main packet or of the main what he will we are using for route here so the options we pass in as the type is phosphorus or URL will be added later we want to auto load entities and we also want to synchronize them what we can do now since your contact module for root we can add at the top of of our back-end project the dot M file where we can store our information and here we can add our database URL that we are adding later so to this we can get to process and database URL so like we named it yeah so next thing would be we want to actually add a new instance for this we are using elephant SQL which makes it very easy to add a post class database so we are creating a new instance we can name it block and we're going to add the tech YouTube forage or we can say YouTube public we can select rich so since I'm from Europe I'm going with island and we can also say that it is free for us so it's very small but this will be enough I think it's about one year me of its megabytes and here we have our URL so you don't need to worry this I will delete this database after this video so if you download the code you have to insert your own data by string to it so you can't use this one so now we are giving this into our ODL fire and if we are now starting our project again we should now be connected to the database so let's see so you can see our conflict module was initialized also the type or MOT web or app controller we met our get route and we started so we can now up here and somewhere should be the best connection so here and if we reload I think it should be connected yeah there it is so everything is fine so we can end this and we can check now at the end of our video have we met all our acceptance criteria so we are using git and github done our API should be set up with Nestor es we have a Postgres database it's just connected it's also done we have our dot and fire and we are saying in a word and I think we cannot say it so this is completely done and we can move it so - done so the last thing that we want to do now is to save everything to a remote remote repository and you see here we have our block and then we have our git folder which is connected to our github project and then beside our API project we also have a kit for novice was created by Vanessa CLI and we don't want to use this so we delete it and now we can just commit our changes and we can say gibbs community get at - up I am so we add all the parts and then we say with a commit message set up lock API with nest trainers and we are on master C here and now we are ahead of master by one commit and we can push it and you see it's done and now we can look it up and if we refresh this we see that business a block now I can just say that your own database string fire you can use free database is and now we can just delete this and push it so we can say remove database database your from gift server this done now we have fulfilled everything so since we have finished now the first video we want to have a small look at what is coming in the next video so we want to create there a user feature module and nest stress and we want to connect it to our Postgres database and we want to create basic crud endpoints and we will of course store all this in the database so if we delete or create a user it is persisted to the database so thank you for watching and see you on the next video if you have some proposals to make the video better just comment them
Info
Channel: Thomas Oliver
Views: 16,638
Rating: undefined out of 5
Keywords: javascript, typescript, nest, nestjs, nest.js, angular, angularjs, postgres, typeorm, visualstudiocode, development, thomas_kilb
Id: 5pFKw5iLL4s
Channel Id: undefined
Length: 19min 23sec (1163 seconds)
Published: Fri May 01 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.