How to build a REST API with Node js & Express

  Рет қаралды 1,745,435

Programming with Mosh

Programming with Mosh

Күн бұрын

Learn to build a REST API with Node js & Express in just 1 hour!
🔥Get the complete Node course: bit.ly/2NfkpOC
Subscribe for more videos:
/ @programmingwithmosh
Want to learn more from me? Check out my blog and courses:
Courses: codewithmosh.com
Blog: programmingwithmosh.com
Facebook: / programmingwithmosh
Twitter: / moshhamedani
TABLE OF CONTENT:
00:49 What are RESTful APIs
06:48 Introducing Express
09:09 Your First Web Server
14:57 Nodemon
16:29 Environment Variables
19:44 Route Parameters
25:22 Handling HTTP GET Requests
30:09 Handling HTTP POST Requests
33:53 Calling APIs using Postman
36:03 Input Validation
44:03 Handling HTTP PUT Requests
52:33 Handling HTTP DELETE Requests

Пікірлер: 928
@danyhan91
@danyhan91 5 жыл бұрын
I was struggling learning how to create a server with node and express. This tutorial is really easy to understand and well-structured for beginners. This is so far the best tutorial on KZbin!!! Thank you so much, Mosh!!!
@greenie62
@greenie62 6 жыл бұрын
Very much dug and appreciated this tutorial. Where as a couple of others I 'learned' things, here I started to actually understand them. That's quite a bit more satisfying!
@YoussefZidan
@YoussefZidan 4 жыл бұрын
I've been learning web development for over a year, and I've never seen such amazing, organized, coherent courses like yours! Thanks Mosh!
@RaksSharkiJa1
@RaksSharkiJa1 10 ай бұрын
so true
@allain5840
@allain5840 5 жыл бұрын
I've been a c# dev for about 7 years and wanted to learn new technologies like nodejs and this video is great to start with. Thanks Mosh
@dataSMASH
@dataSMASH 4 жыл бұрын
Great tutorial. I had just finished the express course on codecademy and was still really confused. Watching this gave me a much better understanding and explanation of the why and how of building endpoints with express on your actual computer. I'll definitely be checking out your courses and your other videos.
@alansaldivares
@alansaldivares 5 жыл бұрын
Man! this for far one of the best well explained Node+Express crash courses I've ever seen. You convinced me to buy the full series :)
@nopa3083
@nopa3083 4 жыл бұрын
Mosh you are the man I learned this in my full-stack boot-camp, but didn't fully understand it. Your example was clear concise and helped me understand it better.
@kaustubhdwivedi1729
@kaustubhdwivedi1729 2 жыл бұрын
This is the clearest, most elegant tutorial of Express JS basics. Amazing since it was uploaded more than 3 years ago. Thanks, Mosh.
@PrisantyaFridayana
@PrisantyaFridayana 5 жыл бұрын
Thank you for your tutorial.. As a starter in Node, I found this really helpful Well structured explanation and good flow for a starter Now I could understand the basic of Node..
@kmfrancescofusco6217
@kmfrancescofusco6217 5 жыл бұрын
Great content! Very clear, well explained, with the perfect balance between simplicity and depth. Fantastic job!
@David-ik4mm
@David-ik4mm 2 жыл бұрын
You are the light of my life! You are a hidden diamond in youtube! I really don't know how a person could be so good at explaining things and make it accessible to all !! Thanks a lot for help.
@kazaakas
@kazaakas 5 жыл бұрын
Knew most of this, but I still watched the entire tutorial because it was so incredibly well structured and didactic. You are a born teacher. I've often fantasized about making great and clear youtube tutorials, in my wildest most perfect fantasies, they looked exactly like the stuff you actually make! Incredible!
@thomaskoenig2102
@thomaskoenig2102 2 жыл бұрын
I agree. Really entertaining videos
@OvidiuPop70
@OvidiuPop70 2 жыл бұрын
If you meet the validation error, you have to do some changes to be according with your Joi version. With my Joi version: joi@17.6.0, the next changes worked: const schema = Joi.object({ name: Joi.string() .min(3) .max(30) .required() }); const result = schema.validate(req.body); console.log(result);
@golu4625
@golu4625 Жыл бұрын
Thanks bro it really help.🙏
@nikki_ke_nuskhe
@nikki_ke_nuskhe 3 жыл бұрын
41:17 from v17 of the joi package, here's the updated code of the post route const schema = Joi.object({ name: Joi.string().min(6).required() }); const result = schema.validate(req.body); console.log(result);
@ahartami1014
@ahartami1014 3 жыл бұрын
Hi, I am using Joi version 17 too. I have problem because Joi.validate or Joi.Object are not recognized functions. Could you help or explain a little bit more? function validateCourse(course){ const schema = Joi.Object({ name: Joi.string().min(3).required() }); return schema.validate(req.body); }
@ahartami1014
@ahartami1014 3 жыл бұрын
I have solved the problem. I have to use Joi.object and correct parameter. It is working now. Thank you. function validateCourse(course){ const schema = Joi.object({ name: Joi.string().min(3).required() }); return schema.validate(course); }
@audraogilvy2605
@audraogilvy2605 2 жыл бұрын
Thank you, Niharika!!!!
@baklangfrog7708
@baklangfrog7708 Жыл бұрын
im not sure if i understood but can i just do validation from client side¿
@zamudpoe
@zamudpoe 3 жыл бұрын
I appreciated a lot this free one hour tutorial, I already finish it and I bougth already right now!, I hope the full course is ok and updated!... If you guys want to learn dont hesitate ... watch this video of one hour and when you finish , you'll be more skilled than the before you watched this free course of one hour!.
@eduardooliveira1239
@eduardooliveira1239 4 жыл бұрын
Man, you are the best! Every second of your classes are worth it. You don't know how fast I learn watching your videos. Thank you very much!
@davenash1547
@davenash1547 6 жыл бұрын
Mosh, your teaching style is so clear. Thank you for the courses!
@NavinKumarmathur
@NavinKumarmathur 6 жыл бұрын
ur style of explaining things in this tutorial is very good. 👍 I'm lucky to watching this tutorial
@balanceiseverything2565
@balanceiseverything2565 3 жыл бұрын
Wow, thank you Mosh. This is the clearest, most detailed explanation I have come across. This helped me so much and I thank you so much. Going to get your course now as I love your teaching. Spot on
@soumaghosh2671
@soumaghosh2671 4 жыл бұрын
Awesome tutorial MOSH! You made me feel at ease with learning new powerful frameworks which I was really scared of....thank you so much....
@gerarldlee
@gerarldlee 5 жыл бұрын
Hi Mosh, this is so great. You explain it in detail yet clearly understandable. Awesome.
@abhishekkumar-ih2ox
@abhishekkumar-ih2ox 5 жыл бұрын
such a great tutorial i had seen ever. Thanks for great organised and to the point video.
@tonydas876
@tonydas876 6 жыл бұрын
Thanks Mosh for this excellent video. Could not have got a simpler way of beginning with Node.
@vaibhavphutane286
@vaibhavphutane286 5 жыл бұрын
I bought your angular course on udemy and that was too good having right content in minimal time. This video about nodejs is awesome thanks mosh
@shanes2007
@shanes2007 5 жыл бұрын
Very good tutorial Mr. Mosh..Things are organised very well...Nothing is more or less..Good effort....Thank u...
@KDOERAK
@KDOERAK 5 жыл бұрын
Another excellent course by Mosh: clear, to the point, practical. Not a waste of time. Thx!
@venkataramanagovindu5244
@venkataramanagovindu5244 4 жыл бұрын
00:49 What are RESTful APIs 06:48 Introducing Express 09:09 Your First Web Server 14:57 Nodemon 16:29 Environment Variables 19:44 Route Parameters 25:22 Handling HTTP GET Requests 30:09 Handling HTTP POST Requests 33:53 Calling APIs using Postman 36:03 Input Validation 44:03 Handling HTTP PUT Requests 52:33 Handling HTTP DELETE Requests
@tekz541
@tekz541 2 жыл бұрын
thank you so much
@r_lonef
@r_lonef Жыл бұрын
@@tekz541 you blind this is in the description
@tekz541
@tekz541 Жыл бұрын
@@r_lonef ahhh, im was not reading the description
@r_lonef
@r_lonef Жыл бұрын
@@tekz541 programmers always should if they need something :)
@mikek.2703
@mikek.2703 5 жыл бұрын
Massive thanks. This helped me a lot.
@vaibhavshukla4761
@vaibhavshukla4761 6 жыл бұрын
Today was a lucky day I got the right tutorial on right time on KZbin
@shivsticker9680
@shivsticker9680 4 жыл бұрын
Fantastic tutorial. A great introduction into REST APIs, coming from someone who has never really messed with them before. Definitely buying this course.
@amirmustafa622
@amirmustafa622 5 жыл бұрын
Thank you sir for your wonderful course on CRUD. Loved it and its the perfect teaching :)
@MichaelRoberts-js6oy
@MichaelRoberts-js6oy 6 ай бұрын
At 41:00, if using Joi v17, Joi.validate() no longer works. Instead your schema object should be const schema = Joi.object({ name: Joi.string() }); Then use const result = schema.validate(req.body);
@fitigued
@fitigued 3 жыл бұрын
As Mosh wisely said to use that specific version of Joi it will work but note that in the current version of Joi you have to make the schema a Joi.object and then at 40:54 validate the schema rather than validate Joi e.g. schema.validate(req.body).
@ahmfahady4184
@ahmfahady4184 4 жыл бұрын
It's really amazing what you are teaching Mosh. Your methods, content and video production are all perfect. I wish you all the best!
@DTX_
@DTX_ 5 жыл бұрын
Thanks a lot, Mosh. I learned a lot. I'm probably going to buy the full course, man!
@maxmustsleep
@maxmustsleep 2 жыл бұрын
A few notes for everybody watching in 2021: // On windows you set environment variables like this: set "$Env:PORT = 5000" //(or maybe without the "" ) // Joi Validation method has changed! it's now like this: const schema = Joi.object({ name: Joi.string().min(3).required(), }); const result = schema.validate(req.body); console.log(result);
@Gnomish198
@Gnomish198 2 жыл бұрын
You're a savior. Thanks!
@shivaniganji4300
@shivaniganji4300 2 жыл бұрын
For me, it's still listening to Port 3000... is there any other way to solve this?
@tochukwuchiguzorom7934
@tochukwuchiguzorom7934 2 жыл бұрын
@@shivaniganji4300 Yeah, just set PORT=5000. don't put any space between the PORT, the equality sign and the 5000.
@cellocarlos
@cellocarlos 5 жыл бұрын
You should make a video teaching how to integrate nodejs and angular features. Your way to teach is unique!
@martind4491
@martind4491 3 жыл бұрын
Mosh, such a clear and fully comprehensive tutorial. Very professional video. I will get the course straight away.
@soniachhabra1943
@soniachhabra1943 4 жыл бұрын
Thanks Mosh, for explaining concepts so easily and clearly with examples.
@rashi1662
@rashi1662 8 ай бұрын
19:14 below commands for windows, these are case sensitive so use exact VARIABLE name For Command Prompt: set PORT=5000 For Power Shell: $env:port=5000 For Bash (Windows): export PORT=5000
@LuliiThePetBestie
@LuliiThePetBestie 5 жыл бұрын
What a great tutorial! Keep up the good work.
@srigoutham1058
@srigoutham1058 2 жыл бұрын
Thank you so much sir for your excellent and detailed explanation of things. I started going through your videos for nodejs and then I have subscribed for the entire course and I cracked 4 interviews as a nodejs developer. Thank you once again for all your effort.
@gerard02700
@gerard02700 3 жыл бұрын
you are one of the best teachers i can absorb anything you teach so quickly in just one month i started to work on a big project (+10 k) with react/node + redux and mongoDB , thank you my master
@Kinos141
@Kinos141 5 жыл бұрын
This has to be the easiest tutorial on the subject. The others I've found do too much. Thank you, sir.
@drupalguy
@drupalguy 3 жыл бұрын
Thank you Mosh, this is a great tutorial; so many node concepts in one lesson and presented in a straightforward way.
@joytank9200
@joytank9200 4 жыл бұрын
Amazing tutorial, explained everything easily and all my concepts got cleared out.Thank you Sir.
@vamshigudimalla1013
@vamshigudimalla1013 3 жыл бұрын
thankyou mosh , I have been watching API building videos but I had always stuck at routes topic but watching your video I not only have cleared my doubt but also acquired good knowledge
@JoyAcharyatvl
@JoyAcharyatvl 5 жыл бұрын
In one sentence , This lecture is awesome Mr. Mosh. thanks.
@lynndemarest1902
@lynndemarest1902 3 жыл бұрын
For those who missed it in the comment below, Joi has changed. This worked for me: const schema = Joi.object({ name: Joi.string().min(3).required() }); const result = schema.validate(req.body); console.log(result); if (result.error){ res.status(400).send(result.error) }
@mathewkempke4570
@mathewkempke4570 3 жыл бұрын
can we find a way to pin this to the top? I almost gave up because of this part
@shanthuog2589
@shanthuog2589 3 жыл бұрын
if we install joi in the way it shows in the video. we wouldn't need this.
@mathewkempke4570
@mathewkempke4570 3 жыл бұрын
@@shanthuog2589 yea lets just not use the updated version of JOI makes sense
@emje6876
@emje6876 2 жыл бұрын
thanks for this .
@dhruvikdeveloper9108
@dhruvikdeveloper9108 3 жыл бұрын
all of your tutorials are awesome, easy to understand, interesting, and very helpful for a beginner student
@jashangoyal7976
@jashangoyal7976 5 жыл бұрын
Its first time I completed the one-hour tutorial. Great explanation sir. Thank you :)
@maheshj
@maheshj 5 жыл бұрын
Oh mosh this is a great tutorial the exact thing I WANTED TO learn,perfect for those who want to learn How backend stuffs work
@harishpaudel7670
@harishpaudel7670 4 жыл бұрын
How can I take course in udemy
@syedminhajhussain9893
@syedminhajhussain9893 3 жыл бұрын
@@harishpaudel7670 by spending money
@martind4491
@martind4491 3 жыл бұрын
@@harishpaudel7670 my opinion would be to take Mosh's instead.
@erezta4155
@erezta4155 5 жыл бұрын
Very professional teaching.. Moish, you are bomba.
@_.sunnyraj._
@_.sunnyraj._ 3 жыл бұрын
*Mosh
@Manas-co8wl
@Manas-co8wl 3 жыл бұрын
*Moisht
@awekeningbro1207
@awekeningbro1207 3 жыл бұрын
Moist
@technopeace4077
@technopeace4077 3 жыл бұрын
Momo
@gridgr1d258
@gridgr1d258 3 жыл бұрын
*Moishy
@manox1808
@manox1808 5 жыл бұрын
Excellent video. Very well structured. thanks
@jeenee_
@jeenee_ 5 жыл бұрын
I'm buying the course! I need to learn Javascript and Node and so far, this is one of the best tutorials I've seen! :)
@MaskuCreative
@MaskuCreative 3 жыл бұрын
Thank you .. You are the best tutor..... FYI , Joy Validate has made change in 2021, i use this code to resolve my problem of "Joi.validate is not a function". app.post('/api/courses', (req,res) => { const schema = Joi.object({ name: Joi.string().min(3).required() }); const result = schema.validate(req.body); console.log(result);
@m.aaqilawan488
@m.aaqilawan488 2 жыл бұрын
good friend
@ProgramWithErik
@ProgramWithErik 6 жыл бұрын
I bought your Angular course on Udemy and I saw you had a KZbin! Very cool!
@srjbora
@srjbora 6 жыл бұрын
Program With Erik me too. 😁
@hardik.motwani
@hardik.motwani 4 жыл бұрын
How is it?
@JauVi85
@JauVi85 5 жыл бұрын
This is great! Nicely explained. There are tons of those tutorials in which they just do tons of stuff while telling that they do all this stuff but NOT telling WHY.
@edhead76
@edhead76 4 жыл бұрын
Your tutorials are so clear. Can't thank you enough!
@AvinashSingh-nq5ud
@AvinashSingh-nq5ud 6 жыл бұрын
Awesome,Please upload more videos on building api
@DefriaManda
@DefriaManda 6 жыл бұрын
You can find all of this here: www.udemy.com/user/moshfeghhamedani/
@clementita54
@clementita54 2 жыл бұрын
00:00 - Intro 00:50 - Restful services 06:50 - Introducing Express 09:10 - Your First Web Server 14:58 - Nodemon 16:30 - Environment Variables 19:45 - Route Parameters 23:07 - autopromo 25:25 - Handling GET Requests 30:10 - Handling POST Requests 44:03 - Handling PUT Requests 52:36 - Handling DELETE Requests 55:25 - Fixing a bug 57:25 - Project
@clementita54
@clementita54 2 жыл бұрын
If you could add this to your description would be cool for new viewers :)
@0zniugnep904
@0zniugnep904 10 ай бұрын
@@clementita54 bump
@sandeepraul7261
@sandeepraul7261 6 жыл бұрын
Amazing tutorial on rest api... I just brought the annual subscription after watching this video... Thanks Mosh for the great initiative you have taken to share your knowledge in simplified form....
@Middollo
@Middollo 5 жыл бұрын
I love this lecture, your speaking manner, pace and explanations are ideal. Not too much detail but just enough. Background music also helps with concentration.
@edwardmarkovich1989
@edwardmarkovich1989 5 жыл бұрын
Excellent, thank you very Mosh.
@kevinveldman9081
@kevinveldman9081 5 жыл бұрын
I laughed out loud.
@meditationandrelaxingsound9077
@meditationandrelaxingsound9077 Жыл бұрын
It's scary seeing that someone knew about this four years ago
@aatiqaghazali7850
@aatiqaghazali7850 Жыл бұрын
Same bro same
@obiabamba8529
@obiabamba8529 Жыл бұрын
This guy knew everything a long time ago, c++, c#, java, JavaScript, python, PHP et cetera. He knows everything in-depth, he is like a super tech master of all genius.
@ananyamahapatra6597
@ananyamahapatra6597 Жыл бұрын
🤣🤣🤣😂😂😂
@angryman9333
@angryman9333 Жыл бұрын
Lmao,
@MedaGrande
@MedaGrande Жыл бұрын
😂😂😂
@Pareshbpatel
@Pareshbpatel 3 жыл бұрын
A very clear tutorial on building APIs with Node and Express. The best tutorial on the subject. Thanks, Mosh {2021-08-14}, {2023-12-15}
@paraghbhide4361
@paraghbhide4361 3 жыл бұрын
I watched your entire Node.Js course which inspired me to change my profile from Angular to Node.js Developer. I have developed 2 apps with ionic/angular & node.js. Thanks to u I could be a full stack developer now.
@codingwalnuthindi6984
@codingwalnuthindi6984 4 жыл бұрын
would recommend you to create a GitHub repository so that we don't have to pause the video to write code and run it every time.
@Snitovets
@Snitovets 6 жыл бұрын
in powershell to set port variable: $env:PORT = 5000
@ezadviper
@ezadviper 5 жыл бұрын
Thanks man, what a savior ...
@ajax6623
@ajax6623 5 жыл бұрын
thanks man, appreciate you
@stevanandric2566
@stevanandric2566 4 жыл бұрын
Thanks man
@Thiago1337
@Thiago1337 4 жыл бұрын
setx PORT 5000
@usamashehzad5991
@usamashehzad5991 5 жыл бұрын
Hi Sir, i took your Angular course... and i made oshop till the end... from then i've been a great fan of you..... never seen such a great teacher.....!!!
@timbermonson
@timbermonson 4 жыл бұрын
Helpful tip: for setting the environment variable in the "PORT" example, "set PORT=5000" may not work in Windows. $env:PORT = 5000 worked for me instead.
@djimenez017
@djimenez017 4 жыл бұрын
Thank You!!
@mohiuddinshahrukh
@mohiuddinshahrukh 2 жыл бұрын
Thanks bud
@karimkhabourii5105
@karimkhabourii5105 6 жыл бұрын
Can u upload it in Udemy ?
@vinodhkumarm1655
@vinodhkumarm1655 5 жыл бұрын
Your videos helped me expand my knowledge thank you so much for your interest in teaching what you have learnt in a very clear & precise manner. Appreciate it!
@eruston
@eruston 5 жыл бұрын
Great tutorial. I always like it when an instructor can admit that there was a bug in what they were coding. Very humble and I like seeing the trouble shooting that the teacher goes through. Great course, I am studying writing smart contracts for cryptocurrencies, and originally watched your video because it came up in a list of videos under the query 'json'. Very fortunate that I found your work, I will be back to udemy to take your course!
@_mayankr
@_mayankr 5 жыл бұрын
joi is deprecated, express-validator is an alternative that can be used now.
@Colstonewall
@Colstonewall 4 жыл бұрын
No, it's just been moved here: hapijs.com/tutorials/validation. If you would've read the page, it says "This module has moved and is now available at @hapi/joi. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues."
@marufhasan9365
@marufhasan9365 5 жыл бұрын
How do you know what will be returned from the request " require("module_name") " . For example you said require("express") returns a function and require("joi") returns a class. I am wondering where i can find those information.
@alexandernordstrom1617
@alexandernordstrom1617 3 жыл бұрын
Excellent question! You'd have to either look at the documentation for the module or explore it yourself, and the easiest way to do that is to run node interactively. Just run node without arguments from the command line, type in the require statement for the module and hit enter. If we're nitpicking, require("joi") returns doesn't return a class but rather an object of the class that it defines.
@emax83
@emax83 3 жыл бұрын
Thank you Mosh! i follow your courses on Udemy, Pluralsight! you're simple, clean and smart! your courses are the best! I've learned many useful things. Thank you so much for sharing.
@ladycoder2095
@ladycoder2095 5 жыл бұрын
I Love both the coding and presentation style, thanks a bunch Mosh :)
@aaron1073
@aaron1073 4 жыл бұрын
If anyone was struggle like I was since Joi has been deprecated here's my solution The way I got it to work was first const Joi = require('@hapi/joi'); The way I defined the schema was const schema = Joi.object({ name: Joi.string().min(3).required() }) The way I got it to validate const result = schema.validate(req.body)
@AlexBuaiscia
@AlexBuaiscia 4 жыл бұрын
thank you! I just had missed a little thing but I managed to make it work now :)
@subparmelon
@subparmelon 4 жыл бұрын
I stumbled across this. Can confirm this as working in version 17.1.0. I would highly recommend that if you are using VS Code make sure your intellisense is working. You will see that validate() takes two arguments *value: any* and an optional argument *options?: Joi.ValidationOptions*.
@josiahchristensen1311
@josiahchristensen1311 6 жыл бұрын
There is an issue with your PUT request logic. Let me give you an example. You have the course id's [1, 2, 3]. Then you delete [1]. So you have [2, 3] with length 2. Your PUT assigns the id (length + 1) which is equal to (3), so now you have the course id's [2, 3, 3] so you also need a validiateCourseID() function in order to ensure you don't have duplicate course id's because when calling a GET request on id=3 you will get duplicate results.
@josiahchristensen1311
@josiahchristensen1311 6 жыл бұрын
Programming with Mosh alright that makes sense. It's just that you taught the course as if we have prior JavaScript knowledge, and hopefully any programmer would have been able to catch a fatal error such as that. Because that would allow you to have lots of duplicate id's.
@dylanbacon5047
@dylanbacon5047 5 жыл бұрын
could just use --> id: courses[courses.length-1].id +1
@osaenzm
@osaenzm 5 жыл бұрын
let maxId = 1; if (courses.length > 0) { maxId = courses.reduce((max, c) => c.id > max ? c.id : max, courses[0].id) + 1; }
@douglaswasswa7122
@douglaswasswa7122 Жыл бұрын
i just want to thank Mosh for that tutorial. i paid for your course and i'm here to say that it was not a mistake. thank you for your easy to understand courses. i appreciate you
@koleen3799
@koleen3799 6 жыл бұрын
Great Tutorial! highly recommended. Thanks Mosh :)
@Pr0Cre
@Pr0Cre 3 жыл бұрын
Okay why at 47:27 gets the whole courses updated when we only have the "course" which we extracted from the courses with the find function Edit: solved
@libruhh2785
@libruhh2785 3 жыл бұрын
Don't ever just edit some problem you've posted about to say "solved." Share what the solution was so that others who are experiencing the same issue can learn from your question.
@rafagawlikowski9267
@rafagawlikowski9267 3 жыл бұрын
It's because of JS nature - whenever you assign some existing object/array to some variable, you actually get the reference to that object/array (not its copy) Check it out yourself in the console let obj1 = {a: 1} let obj2 = obj1 obj2.a = 4 console.log(obj1.a) // 4 That's because it's the same object console.log(obj1 === obj2) Ahh - and also notice that {a: 1} === {a: 1} // false That's because of how JS checks equality of objects
@coolrock3733
@coolrock3733 3 жыл бұрын
@@rafagawlikowski9267 Thanks for taking the time to type this out and explain
@DrazV2
@DrazV2 5 жыл бұрын
I can't get the PORT environment variable to work on Windows 10... What am I doign wrong? I've tried git bash, powershell and going through the system properties. I've tried $env:PORT, export PORT, set PORT, PORT... Also for some reasons I couldn't get the PUT and DELETE requests to work.
@RenuRawat
@RenuRawat 5 жыл бұрын
You can use cross-env. It will let you use environment variables across platforms. Accessing process environment variables is always a problem in windows machines. You can simple install it by running the command- npm I cross-env -D Then go to your package.json file inside scripts section you will see the start command, simple replace it with "cross-env PORT=3000 npm start" (Just prepend cross-env before the star command)
@RenuRawat
@RenuRawat 5 жыл бұрын
Regarding you your second query it may be some problem with the routing. Happy coding
@TheAssasinsBreed
@TheAssasinsBreed 5 жыл бұрын
nice teacher, nice tutorial :) totally worth my time.. thanks!
@Jovirus
@Jovirus 5 жыл бұрын
Very helpful, and detail. Thank you.
@kavyaagrawal2013
@kavyaagrawal2013 3 жыл бұрын
"And I know this probably doesn't make any sense to you... ...because it was introduced by a *p h p s t u d e n t* " I DIED XD
@nap4lm238
@nap4lm238 3 жыл бұрын
"PhD student as part of his thesis", not PHP
@wohani2039
@wohani2039 3 жыл бұрын
When someone loves you, the way they talk about you is different. You feel safe and comfortable.
@aloy5471
@aloy5471 3 жыл бұрын
So
@ashishpatel6343
@ashishpatel6343 3 жыл бұрын
This contest is terrific Mosh. Easy to understand and clear explanations. I also enjoyed the other NodeJS videos.
@hamedganjeali6735
@hamedganjeali6735 3 жыл бұрын
You rock! I wonder why haven't I found your channel 'till now. tnx for your spectacular tutorials
@lathakumari626
@lathakumari626 Жыл бұрын
How to get and post real data is not shown. This video is not worth watching for an hour.
@chiragBharadwaj21
@chiragBharadwaj21 5 ай бұрын
For that u have to pay...
@dejanstojkovic6370
@dejanstojkovic6370 4 жыл бұрын
Mr. Mosh your video lectures are just as Tina says in her song: Simply The Best. Thanks a lot.
@ollysalanson9452
@ollysalanson9452 3 жыл бұрын
These vids are so good, I've been watching your channel for 48hours - sleep and I'm nearly at the stage of making my own API :D
@xColdzero15
@xColdzero15 Жыл бұрын
This is my 3rd time watching a Mosh Tutorial Video starting from React, Node.js, to Express and it has really helped me in my career as an Application Developer. Thanks Mosh!
@kurisuta1305
@kurisuta1305 10 ай бұрын
same... Mosh is so awesome!!!!
@chiragpatil8075
@chiragpatil8075 5 жыл бұрын
best tutorial for understand what is api and how to build...thank you sir
@sriramkulkarni3691
@sriramkulkarni3691 6 жыл бұрын
Awesome Mosh, i like your way you explaining the code and much clarity is their in your lecture
@yoavk
@yoavk 4 жыл бұрын
Looking forward to watch this video this weekend. Thanks!
@farstyfarstfarst9668
@farstyfarstfarst9668 4 жыл бұрын
Seriously well-crafted, thanks!
@MuhammadOwaisAli
@MuhammadOwaisAli 4 жыл бұрын
Great tutorial and very easy to follow. I always thought APIs were scary but you made it seem harmless. Kep up the good work. And if possible can you make a video on How to connect the server to database (like mongoDB) and manipulate data through end points?
@tylerkillspoon
@tylerkillspoon 5 жыл бұрын
Incredible tutorial!! Thank you Mosh :)
Node.js Tutorial for Beginners: Learn Node in 1 Hour
1:18:16
Programming with Mosh
Рет қаралды 6 МЛН
0% Respect Moments 😥
00:27
LE FOOT EN VIDÉO
Рет қаралды 34 МЛН
КАРМАНЧИК 2 СЕЗОН 4 СЕРИЯ
24:05
Inter Production
Рет қаралды 587 М.
1 класс vs 11 класс (рисунок)
00:37
БЕРТ
Рет қаралды 4,1 МЛН
What is a REST API?
9:12
IBM Technology
Рет қаралды 1,4 МЛН
Is Coding Still Worth Learning in 2024?
9:33
Programming with Mosh
Рет қаралды 137 М.
REST API Crash Course - Introduction + Full Python API Tutorial
51:57
The FASTEST Way to Learn to Code & Get a Job
5:48
Programming with Mosh
Рет қаралды 70 М.
Learn Express JS In 35 Minutes
36:03
Web Dev Simplified
Рет қаралды 725 М.
Node.js Ultimate Beginner’s Guide in 7 Easy Steps
16:20
Fireship
Рет қаралды 1,5 МЛН
What is a REST API?
6:05
Programming with Mosh
Рет қаралды 764 М.
Build ENTIRE Frontends With ONE Prompt - OpenUI Tutorial
8:59
Matthew Berman
Рет қаралды 44 М.
0% Respect Moments 😥
00:27
LE FOOT EN VIDÉO
Рет қаралды 34 МЛН