How to build a REST API with Node js & Express

How to build a REST API with Node js & Express

Programming with Mosh

6 лет назад

1,769,107 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

En Yang
En Yang - 11.11.2023 20:46

I like your font in this video, can you provide which font you are using? thank you!

Ответить
coding4fun
coding4fun - 10.11.2023 20:16

Extremely useful tutorial!

Ответить
Naman Rustagi
Naman Rustagi - 07.10.2023 22:52

Explained everything very beautifully ,simply,precisely. Wow!!!!!!!!!!!

Ответить
GANTALA SWARUP KUMAR
GANTALA SWARUP KUMAR - 02.10.2023 19:57

hi sir How to connect one Controller view id to another controller javascript id in MVC DB first opprouch

Ответить
Ehsan Ul Haq Hashmi
Ehsan Ul Haq Hashmi - 13.09.2023 22:48

Love you bro for all you are doing. Thanks a lot

Ответить
571 Sai Parthu
571 Sai Parthu - 13.09.2023 19:29

its showing Joi.validate is not a function? anyone facing same issue?

Ответить
Owais Ahmed
Owais Ahmed - 11.09.2023 18:04

thanks🥰😍🤩

Ответить
Kaleem Ahmed
Kaleem Ahmed - 07.09.2023 13:38

The way you explain theory is awesome we never get bored of it

Ответить
Khiel Mantilla
Khiel Mantilla - 28.08.2023 22:56

lol dude you're not healthy enough to be teaching anyone. you sound like an autistic retarded kid

Ответить
Evans Jones
Evans Jones - 18.08.2023 14:34

why waste my time at universities and mosh is around.

Ответить
Vivek K.
Vivek K. - 16.08.2023 16:32

if you get Joi error. Use this instead.
// for Joi, validation
const schema = Joi.object({
name:Joi.string().min(3).required()
});
const result = schema.validate(req.body)

Ответить
Commander germ
Commander germ - 06.08.2023 03:46

king mosh

Ответить
Shanthala
Shanthala - 24.07.2023 08:33

Thank you very much ,

Ответить
ToniSun
ToniSun - 19.07.2023 12:45

❤🧡💛💚💙💜🤎🖤🤍 for the new Version of npm ->Joi
app.get('/api/add-course', (req, res) => {
const schema = Joi.object({
name: Joi.string().min(3).required(),
description: Joi.string().min(3).required()
});

const { error } = schema.validate(req.body);

if (error) {
// 400 Bad Request
res.status(400).send(error.details[0].message);
return;
}

// rest of your code
});

Ответить
Shashank Yadav
Shashank Yadav - 19.07.2023 05:22

Nicely explain each points. Learn a lot❤

Ответить
Utkarsh I.
Utkarsh I. - 11.07.2023 09:11

what extension is he using to get all JSON outputs in that pretty format?

Ответить
Mehrose Nasir
Mehrose Nasir - 02.07.2023 09:47

if anyone facing a 'could not find joi module' problem while loading the joi module, then install it in your working directory and not globally.

Ответить
SRIHARI HARAN D
SRIHARI HARAN D - 28.06.2023 17:55

small update : Joy.validate() is no longer available in v-16;

Ответить
Kuri Suta
Kuri Suta - 19.06.2023 18:28

Thanks a lot! i finished ReactJs, NodeJs, and Express in two days! Thanks a lot <3

Ответить
AirWind Games
AirWind Games - 25.05.2023 18:29

Hi Mosh, Thank you for your crash course videos. Helped a lot in my career as an IT personnel.

Ответить
Uttam korat
Uttam korat - 12.05.2023 06:30

amazing

Ответить
codeConcept Ghana💻
codeConcept Ghana💻 - 07.05.2023 05:02

This course is still Gold I bet. Very valuable

Ответить
Zeyad Abbood
Zeyad Abbood - 28.04.2023 18:09

Could u tell us which to learn api or html, css, js

Ответить
CodeWithLakmal
CodeWithLakmal - 07.04.2023 06:58

Dear sir, thank you very much for your tutorial. You're great teacher!

Ответить
Daniel Bernardo Graset
Daniel Bernardo Graset - 22.03.2023 18:54

Use Thunder Client instead of Postman !!

Ответить
Winux Worx
Winux Worx - 17.03.2023 15:19

Great video. However, it needs to be updated already since so much has change for the past 5 years.

Ответить
Latha Kumari
Latha Kumari - 14.03.2023 21:17

How to get and post real data is not shown. This video is not worth watching for an hour.

Ответить
Yogesh Bhatt
Yogesh Bhatt - 08.03.2023 00:17

First Time I am learning Node.js bcz I am Frontend Dev.. Its this video is quite easy to learn..
Thanx

Ответить
Mr. Marcial Glori
Mr. Marcial Glori - 02.03.2023 08:04

Amazing it can run in intranet.

Ответить
Manasa H R
Manasa H R - 01.03.2023 10:14

How to create api using mssql server stored procedure in nodejs. Could you please help me..

Ответить
Chess Traps
Chess Traps - 21.02.2023 08:12

I'm come here suggested by chatGpt

Ответить
Andrii
Andrii - 29.01.2023 16:06

1,5 millions of views and 26k likes. Totally unfair.. Thank you Mosh!

Ответить
جزائري من صحراء algerian from sahara
جزائري من صحراء algerian from sahara - 23.01.2023 08:59

U didn't explain midleware

Ответить
samuel xavier
samuel xavier - 20.01.2023 20:31

It's 2023 and we are able to build rest APIs with single CLI command using LoopBack 4

Ответить
Dumb Guy
Dumb Guy - 10.01.2023 02:28

The best tutorial ever! @Programming with Mosh

Ответить
Kshitiz Bhardwaj Singh
Kshitiz Bhardwaj Singh - 03.01.2023 00:47

Come on you knew all this in Jan 2018.... What the hell man.. hats off🙌🙌

Ответить
AR GAMING
AR GAMING - 28.12.2022 11:17

You should have included the codes in the description.I got stuck at Input Validation.I am getting error.I have checked and rechecked the code and there is no mistake.I installed the latest version of joi.

Ответить
Mohammad Emal
Mohammad Emal - 27.12.2022 12:01

is there any one for response?

Ответить
Carl Ransom
Carl Ransom - 22.12.2022 06:36

Best investment I've made all year! Get the full course. Give this man his just due!

Ответить
Coldzero
Coldzero - 15.12.2022 12:26

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!

Ответить
The Fullstack Mechanic
The Fullstack Mechanic - 07.11.2022 21:59

Hy Mosh... Please do you have a tutorial of this same rest crud api in an MVC structure without a Database??? 🤕🤕

Ответить
pranjal sonowal
pranjal sonowal - 28.10.2022 14:29

I purchased courses like React js, you can even understand without mastering java language

Ответить
Debasish Bhattacherjee
Debasish Bhattacherjee - 27.10.2022 17:20

You are Wonderful. Really, I have nothing to say.

Ответить
Paul Massey
Paul Massey - 24.10.2022 20:37

I am not putting your tutorial down I am just old school
Most of this good however I always use { and } in case of needing more than one statement after the control structure
if (condition) {
statement1;
} else {
statement2;
}
looks a bit ugly but it does stops some types of bugs
because should extra statements are required
if (condition) {
statement1;
statement3;
} else {
statement2;
statement4;
}
I was taught each function/method should have one entry and one exit point yes it also can ugly. My main problem using exceptions are a lazy way of handling errors IMHO.
You might have guessed by now I was taught structured programming a long while ago
BASIC, Assembly Language (6502/6510/6809/68000, and ST6 2kb of ROM 64 bytes of RAM) Pascal, Modula2, COBOL, C all without exception handling (so problems had to be dealt with within the function as it occurred. Java/JavaScript/C++ and more recently Python all having exception handling I still check say a file exists before I use it in these languages as I said I am old school
Thanks for your tutorials opening up new languages to an old timer like me.

Ответить
gg
gg - 18.10.2022 11:35

this guy is the best teacher, hands down

Ответить