[{"data":1,"prerenderedAt":394},["ShallowReactive",2],{"tag-node":3},{"tag":4,"articles":24},{"id":5,"title":6,"body":7,"description":14,"extension":15,"img":16,"meta":17,"name":18,"navigation":19,"path":20,"seo":21,"stem":22,"__hash__":23},"tags\u002Ftags\u002Fnode.md","Node",{"type":8,"value":9,"toc":10},"minimark",[],{"title":11,"searchDepth":12,"depth":12,"links":13},"",2,[],"Node allows developers to write JavaScript code that runs directly in a computer process itself instead of in a browser. Node can, therefore, be used to write server-side applications with access to the operating system, file system, and everything else required to build fully-functional applications.","md","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"node",true,"\u002Ftags\u002Fnode",{"description":14},"tags\u002Fnode","kBZEUEYUGIoLCPM88yi6RG1QD8TIc4JbSwgSFvC1_Gc",[25,117,185],{"id":26,"title":27,"author":28,"body":29,"createdAt":107,"description":108,"extension":15,"img":109,"meta":110,"navigation":19,"path":111,"seo":112,"stem":113,"tags":114,"updatedAt":107,"__hash__":116},"articles\u002Farticles\u002Flocal_tunnel.md","Unleash your localhost on the world!","[object Object]",{"type":8,"value":30,"toc":105},[31,43,46,62,68,74,86,91,99],[32,33,34,35],"p",{},"Expose your local development web service to the world with\n",[36,37,42],"a",{"href":38,"target":39,"rel":40},"https:\u002F\u002Ftheboroer.github.io\u002Flocaltunnel-www\u002F","_blank",[41],"noopener","Localtunnel!",[32,44,45],{},"No need to fuss with DNS and firewall settings",[47,48,49,53,56,59],"ul",{},[50,51,52],"li",{},"Simply install Localtunnel (which requires NodeJS) globally and use the command line interface to request a tunnel to your local server.",[50,54,55],{},"You'll receive a unique, publicly accessible URL that will proxy all requests to your locally running webserver.",[50,57,58],{},"Just share the URL with anyone you want to have access, and as long as your local instance of Localtunnel remains active, all requests will be routed to your local service.",[50,60,61],{},"Quick and easy!",[32,63,64],{},[65,66,67],"strong",{},"Install",[32,69,70],{},[71,72,73],"code",{},"npm install -g localtunnel",[32,75,76,79,80,85],{},[65,77,78],{},"Start a webserver on some local port"," (eg ",[36,81,82],{"href":82,"rel":83},"http:\u002F\u002Flocalhost:8000",[84],"nofollow",") and use the command line interface to request a tunnel to your local server:",[32,87,88],{},[71,89,90],{},"lt --port 8000",[32,92,93,94,98],{},"As long as your local instance of lt remains active, you will be given a unique URL, such as ",[36,95,96],{"href":96,"rel":97},"https:\u002F\u002Fflkajsfljas.loca.lt",[84],",\nwhich can be shared with anyone. All requests made to this URL will be directed to your local service at the specified port.",[32,100,101],{},[102,103],"img",{"alt":11,"src":104},"\u002Farticles\u002Fimages\u002Flocaltunnel_2.png",{"title":11,"searchDepth":12,"depth":12,"links":106},[],"2022-12-29","It is necessary to share my localhost web application with the world in order for it to be accessed from other devices and individuals.","\u002Farticles\u002Fimages\u002Flocaltunnel.png",{},"\u002Farticles\u002Flocal_tunnel",{"title":27,"description":108},"articles\u002Flocal_tunnel",[18,115],"npm","i2TIUL53Z4P3kfhtPeZT9twwmIdeoCYgSTI3DaIf1OE",{"id":118,"title":119,"author":120,"body":121,"createdAt":176,"description":177,"extension":15,"img":178,"meta":179,"navigation":19,"path":180,"seo":181,"stem":182,"tags":183,"updatedAt":176,"__hash__":184},"articles\u002Farticles\u002Fchange-default-global-installation-directory-for-nodejs-on-windows.md","Change default global installation directory for node.js on Windows",null,{"type":8,"value":122,"toc":174},[123,126,129,132,135,138,141,144,147,154,157,160],[32,124,125],{},"Within companies often Anti-Virus (AV) can impact the installation process of common\u002Frecent npm modules.  EPERM errors can occur during the npm -g installation process indicating that there are conflicts between the AV scanning process and the installation. ",[32,127,128],{},"The default location for node modules has generally been a sensitive directory for AV software %appdata% and can be locked down.    Node Installation",[32,130,131],{},"Node will install itself to this directory on your Windows PC C:\\Program Files\\nodejs\\node_modules\\npm",[32,133,134],{},"Following path will be added to the PATH variable C:\\Program Files\\nodejs\\",[32,136,137],{},"Within this directory is a npmrc file with the following PREFIX default prefix=${APPDATA}\\npm    Changing the default location of node_modules",[32,139,140],{},"You can determine the current node default directory by executing npm config get prefix (you can run this after your following update)",[32,142,143],{},"Open the npmrc file located in C:\\Program Files\\nodejs directory.",[32,145,146],{},"Default value prefix=${APPDATA}\\npm  which converts to C:\\Users{username}\\AppData\\Roaming\\npm directory.",[32,148,149,150,153],{},"Change the prefix value to your new custom location i.e. prefix=c:\\npm      * ",[65,151,152],{},"ALSO"," –>",[32,155,156],{},"Change the existing PATH variable from c:\\Users{username}\\AppData\\Roaming\\npm to c:\\npm (Right click on This PC, Advanced Tab, Environment Variables, Select Path in the list and Edit, find the existing npm path and change it)",[32,158,159],{},"Alternative to changing the npmrc file manually",[32,161,162,163,166,167,169,170],{},"npm config set prefix c:\\npm",[164,165],"br",{},"\nnpm config set cache c:\\npm-cache",[164,168],{},"\nWindows System Path can be edited via ",[36,171,173],{"href":172,"target":39},"http:\u002F\u002Fwww.rapidee.com\u002Fen\u002Fabout","RapidEE",{"title":11,"searchDepth":12,"depth":12,"links":175},[],"2019-03-16T15:27:17.345Z","Change the default global location for installation of npm packages, cache etc.","\u002Farticles\u002Fimages\u002Fnode.png",{},"\u002Farticles\u002Fchange-default-global-installation-directory-for-nodejs-on-windows",{"title":119,"description":177},"articles\u002Fchange-default-global-installation-directory-for-nodejs-on-windows",[18],"Hxu8wBevT7-sY8OwgP_bylX4WIRcsDQVSc2j9oAVKu4",{"id":186,"title":187,"author":120,"body":188,"createdAt":385,"description":386,"extension":15,"img":375,"meta":387,"navigation":19,"path":388,"seo":389,"stem":390,"tags":391,"updatedAt":385,"__hash__":393},"articles\u002Farticles\u002Fnode-js-server-side-javascript-process-consuming-too-much-memory.md","Node.js server-side JavaScript process consuming too much memory",{"type":8,"value":189,"toc":383},[190,193,196,348,351,354,357,379],[32,191,192],{},"After the installation of Visual Studio 2017 latest edition, I have been watching memory consumption. Node.exe seems to be consistently around 500-700mb of RAM!. I did find this post which helps explain what is going on.",[32,194,195],{},"The node process you are seeing is powering the JavaScript language service. You will see this process appear anytime you edit a JS file, TS file, or any file with JS\u002FTS inside (html, cshtml, etc). This process is what powers IntelliSense, code navigation, formatting, and other editing features and it does this by analyzing the entire context of your project. If you have a lot of .js files in your project, this can get large, but more than likely the issue is that you have a lot of library files that are being analyzed. By default, we will scan every .js\u002F.ts file in your project. But you can override this behavior and tune the language service to only focus on your code. To do this create a tsconfig.json in your project root with the following settings:”",[197,198,202],"pre",{"className":199,"code":200,"language":201,"meta":11,"style":11},"language-js shiki shiki-themes github-light github-dark","{\n    \"compilerOptions\": {\n        \"allowJs\": true,\n        \"noEmit\": true\n    },\n    \"exclude\": [\n        \"wwwroot\u002Flib\" \u002F\u002Fignore everything in the lib folder (bootstrap, jquery, etc)  \n        \u002F\u002F add any other folders with library code here\n    ],\n    \"typeAcquisition\": { \n        \"enable\": true,\n        \"include\": [\n            \"bootstrap\"\n            \"jquery\"  \u002F\u002Flist libraries you are using here\n        ]\n    }\n}  \n","js",[71,203,204,213,222,238,249,255,264,274,280,286,295,307,315,321,330,336,342],{"__ignoreMap":11},[205,206,209],"span",{"class":207,"line":208},"line",1,[205,210,212],{"class":211},"sVt8B","{\n",[205,214,215,219],{"class":207,"line":12},[205,216,218],{"class":217},"sZZnC","    \"compilerOptions\"",[205,220,221],{"class":211},": {\n",[205,223,225,228,231,235],{"class":207,"line":224},3,[205,226,227],{"class":217},"        \"allowJs\"",[205,229,230],{"class":211},": ",[205,232,234],{"class":233},"sj4cs","true",[205,236,237],{"class":211},",\n",[205,239,241,244,246],{"class":207,"line":240},4,[205,242,243],{"class":217},"        \"noEmit\"",[205,245,230],{"class":211},[205,247,248],{"class":233},"true\n",[205,250,252],{"class":207,"line":251},5,[205,253,254],{"class":211},"    },\n",[205,256,258,261],{"class":207,"line":257},6,[205,259,260],{"class":217},"    \"exclude\"",[205,262,263],{"class":211},": [\n",[205,265,267,270],{"class":207,"line":266},7,[205,268,269],{"class":217},"        \"wwwroot\u002Flib\"",[205,271,273],{"class":272},"sJ8bj"," \u002F\u002Fignore everything in the lib folder (bootstrap, jquery, etc)  \n",[205,275,277],{"class":207,"line":276},8,[205,278,279],{"class":272},"        \u002F\u002F add any other folders with library code here\n",[205,281,283],{"class":207,"line":282},9,[205,284,285],{"class":211},"    ],\n",[205,287,289,292],{"class":207,"line":288},10,[205,290,291],{"class":217},"    \"typeAcquisition\"",[205,293,294],{"class":211},": { \n",[205,296,298,301,303,305],{"class":207,"line":297},11,[205,299,300],{"class":217},"        \"enable\"",[205,302,230],{"class":211},[205,304,234],{"class":233},[205,306,237],{"class":211},[205,308,310,313],{"class":207,"line":309},12,[205,311,312],{"class":217},"        \"include\"",[205,314,263],{"class":211},[205,316,318],{"class":207,"line":317},13,[205,319,320],{"class":217},"            \"bootstrap\"\n",[205,322,324,327],{"class":207,"line":323},14,[205,325,326],{"class":217},"            \"jquery\"",[205,328,329],{"class":272},"  \u002F\u002Flist libraries you are using here\n",[205,331,333],{"class":207,"line":332},15,[205,334,335],{"class":211},"        ]\n",[205,337,339],{"class":207,"line":338},16,[205,340,341],{"class":211},"    }\n",[205,343,345],{"class":207,"line":344},17,[205,346,347],{"class":211},"}\n",[32,349,350],{},"Another option",[32,352,353],{},"Disabling the TypeScript extension is a workaround for the moment, at least for me. Click Tools, Extensions and Updates, search for \"TypeScript\" and disable it. Restart Visual Studio.”",[32,355,356],{},"Give it a try and let me know how it goes.",[32,358,359,360,363,366,368],{},"Reference: ",[36,361],{"title":362,"href":362},"https:\u002F\u002Fdevelopercommunity.visualstudio.com\u002Fcontent\u002Fproblem\u002F27033\u002Fnodejs-server-side-javascript-process-consuming-to.html",[36,364,362],{"href":362,"rel":365},[84],[164,367],{},[36,369,372],{"style":370,"href":371},"display: none;","\u002Farticles\u002Fimages\u002Fopen-live-writer-nodjs-server-side-javascript-process-co_13be9-js_2.png",[102,373],{"style":374,"title":201,"src":375,"alt":201,"width":376,"height":377,"border":378},"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;","\u002Farticles\u002Fimages\u002Fopen-live-writer-nodjs-server-side-javascript-process-co_13be9-js_thumb.png",203,156,0,[380,381,382],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":11,"searchDepth":12,"depth":12,"links":384},[],"2017-03-17T06:10:45.510Z","After the installation of Visual Studio 2017 latest edition, I have been watching memory consumption.  Node.exe seems to be consistently around 500-700mb of RAM!.  I did find this post which helps explain what is going on.",{},"\u002Farticles\u002Fnode-js-server-side-javascript-process-consuming-too-much-memory",{"title":187,"description":386},"articles\u002Fnode-js-server-side-javascript-process-consuming-too-much-memory",[392,18],"visualstudio","tfPFLFfbdUgW8RNm41oUcBHq_jakGfUAHcj1hY7w06Y",1781574759755]