![]() One error in one method took the application down for everyone. Which means if you go back to the browser and try to go to the root URL of the site, you get the same error page. ![]() If you go back to your terminal you will see that the application is completely down. Which - no big deal right? It’s one error. If we run this directly against Node with npm start and navigate to the read endpoint, we get an error because that file doesn’t exist. viewed at app.get("/", function(req, res) !`)) The simplest Express server I can think of… const express = require("express") Let’s talk about the reasoning behind this statement. Never run directly against Node in production Perhaps our relative Venn Diagrams don’t overlap on this subject.įirst off, let’s address the statement “never run apps directly against Node in production”. Well, assuming that Alicia’s diagram is true, I would like to share with you what I now know about running Node apps in production. I don’t control what gets played next while I’m writing this article and Dashboard Confessional is a helluva drug. I don’t want to spend the rest of my life as a tiny, shrinking blue dot of insignificance. I love this diagram so much because I want it to be true. ![]() There is a better diagram created by Alicia Liu that kind of changed my life. If I was to draw a Venn Diagram of what I know vs what I feel like everyone else knows, it would look like this…īy the way, that tiny dot gets smaller the older I get. But I didn’t know that! Should I have known that?!? AM I STILL ALLOWED TO PROGRAM? ![]() I nodded vigorously to signal that I also would never ever run against Node in production because…hahaha….everyone knows that. Just a few weeks ago I was talking to a friend who mentioned off-hand, “you would never run an application directly against Node in production”. Sometimes I wonder if I know much of anything at all. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |