MountainWest JavaScript 2014

Gestión de errores con NodeJS

Jamund Ferguson  · 

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

this is so weird it's gonna hook this up to their face before I feel like I'm in the dentist office or something I hope I hope I don't seem that scared so before I get started on my talk about air handling and node and and all across the stack

I just want to ask you a couple of questions first question why is there a table here but second question like how many of you guys use node in production so 25% okay so out of those how many of you guys are using Express basically all of them and no one using

--happy or one happy guy any other frameworks out there that you guys are using for from note just curious Khoa there you go what cracking yeah cracking there you go it's PayPal stuff rest if I yeah so there's a couple different frameworks but for

the vast majority of people are using Express I'm mostly going to talk about error handling with Express what about on the client side raise your hand if your angular user ember users angular actually one where's the react guy awesome uh flight Hey

and backbone any backbone people still around oh man like three there's three that's amazing all right I just wanted to get to know you a little bit better cuz you'll learn a little bit about me so I used to work at oDesk and we wanted to convince

everyone at owed us that it was a super awesome idea to use nodejs like oh no it is so cool PHP is the dumps we're gonna move everything to notes so they're like okay you can test it out on this really cool mobile web app we're gonna work on you

know we can people can log in and they can manage their contractors that they're working with and we built this thing it was really shiny it was a nice app and um so it's like running for a few days and I get this message this email from our IT guy

and he's like hey so your no note server went crazy again and just started eating up all the disk on the server I just I stopped the app and restarted it and deleted all the logs and it's fine everybody my whole story about node being so easy to use

and so reliable is just like totally sank to the ground but I'm like no no it's fine like I'll just like update my node modules and like probably it's like sent to us or something swell so um a couple days later I get the same email again like

hey your node server like started just like destroying the server it actually took down the production website so I'm gonna have to move node to its own little sandbox environment and limit the amount of disk space it gets and this is not looking good

for your your whole node is awesome so um he said but this time I preserved the logs and I thought ah perfect I'm gonna take those logs I'll get this thing solved in five minutes so here the logs anyone know what's wrong okay first of all you can't

read it but second of all if you could read it it you would get absolutely no information there's nothing in this stack trace that that is anything to do with my app and so I'm sitting there thinking like okay okay having a little bit of a panic right

because like I'm trying to give in to the company to move to node I can't figure out what's wrong but I'm like I know what this is this is open source you know it's someone else's problem so so I get on IRC and you know I I felt a little

bit bad because you know I know these guys that work on Express are they're amazing engineers they do some great things they're doing this in their spare time but I had to tell them you know I regret to inform you but there's a serious bug in your

app there's something wrong with your module and like so I go in i go in IRC i'm in chat and like person one you're a mom person to like that's so funny it infinite loops and fills up your logs that's so great haha and I'm like you

don't understand like this is huge like no dude isn't working for me and it was it was sort of terrifying and so it's always your problem right with open source you work on a module it's your problem you want some better documentation for angularjs

who's complaining about docs for angularjs a lot of people out anyone that's used angularjs has complained about the bus guess what it's your problem go fix them it's open source so that's one thing I learned about open source it's

always always your problem so what can you do about it well for me and my my my challenges with Express I dug deeper into the code I finally sort of figured out how to work around this problem and for me I had to learn how to do proper error handling in my

[ ... ]

Nota: se han omitido las otras 2.328 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.