[{"data":1,"prerenderedAt":302},["ShallowReactive",2],{"tag-npm":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\u002Fnpm.md","Npm",{"type":8,"value":9,"toc":10},"minimark",[],{"title":11,"searchDepth":12,"depth":12,"links":13},"",2,[],"npm is two things... first and foremost, it is an online repository for the publishing of open-source Node.js projects; second, it is a command-line utility for interacting with said repository that aids in package installation, version management, and dependency management.","md","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"npm",true,"\u002Ftags\u002Fnpm",{"description":14},"tags\u002Fnpm","lIC-Oaulb8LKEOVAMw2ea29_Ir9k8IMaGOx8do5mHaI",[25,117,222],{"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",[115,18],"node","i2TIUL53Z4P3kfhtPeZT9twwmIdeoCYgSTI3DaIf1OE",{"id":118,"title":119,"author":120,"body":121,"createdAt":212,"description":213,"extension":15,"img":214,"meta":215,"navigation":19,"path":216,"seo":217,"stem":218,"tags":219,"updatedAt":212,"__hash__":221},"articles\u002Farticles\u002Fnpm-dependencies-vs-devdependencies.md","NPM - dependencies vs devDependencies",null,{"type":8,"value":122,"toc":210},[123,126,129,139,142,166,175,202],[32,124,125],{},"Technically, when using a bundler like webpack, the result will not make a difference with regard to the output of your bundling process.",[32,127,128],{},"That being said, dividing the packages in dependencies and devDependencies still helps you (and others looking at your package.json) to understand which packages are meant to end up being a part of the bundle created (dependencies), and which are needed to build the bundle only (devDependencies).",[32,130,131,132,135,136,138],{},"Just remember main principle:",[133,134],"br",{},"\n-> If you need package in production put it into dependencies (most likely axios should be in dependencies in your case).",[133,137],{},"\n-> If you need package only during development, put it into devDependencies (e.g. unit-test libraries, which isn't needed in productions should be in devDependencies",[32,140,141],{},"Summary of important behavior differences:",[32,143,144,150,151,153,156,157,160,162,165],{},[36,145,147],{"href":146},"https:\u002F\u002Fgithub.com\u002Fnpm\u002Fnpm\u002Fblob\u002F2e3776bf5676bc24fec6239a3420f377fe98acde\u002Fdoc\u002Ffiles\u002Fpackage.json.md#dependencies",[71,148,149],{},"dependencies"," are installed on both:",[133,152],{},[71,154,155],{},"npm install"," from a directory that contains ",[71,158,159],{},"package.json",[133,161],{},[71,163,164],{},"npm install $package"," on any other directory",[32,167,168,174],{},[36,169,171],{"href":170},"https:\u002F\u002Fgithub.com\u002Fnpm\u002Fnpm\u002Fblob\u002F2e3776bf5676bc24fec6239a3420f377fe98acde\u002Fdoc\u002Ffiles\u002Fpackage.json.md#devdependencies",[71,172,173],{},"devDependencies"," are:",[32,176,177,178,180,181,183,184,187,188,190,191,194,195,198,199,201],{},"also installed on ",[71,179,155],{}," on a directory that contains ",[71,182,159],{},", unless you pass the ",[71,185,186],{},"--production"," flag.",[133,189],{},"\nnot installed on ",[71,192,193],{},"npm install \"$package\""," on any other directory, unless you give it the ",[71,196,197],{},"--dev"," option.",[133,200],{},"\nare not installed transitively.",[32,203,204,205],{},"Reference: ",[36,206,209],{"href":207,"target":39,"rel":208},"https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F18875674\u002Fwhats-the-difference-between-dependencies-devdependencies-and-peerdependencies\u002F22004559#22004559",[41],"StackOverflow",{"title":11,"searchDepth":12,"depth":12,"links":211},[],"2020-01-07T14:02:12.046Z","Webpack is one of those technologies that has become increasingly important and yet struggles to be clear and obvious for most developers.  One of the best ways to get up to speed is to start from scratch (empty package.json) and build up one piece at a time to understand how it works.  Below are some notes about package.json and how dependencies are established.","\u002Farticles\u002Fimages\u002Fnpm.png",{},"\u002Farticles\u002Fnpm-dependencies-vs-devdependencies",{"title":119,"description":213},"articles\u002Fnpm-dependencies-vs-devdependencies",[220,18],"vuejs","6JDIyAP2t28x6-aZhXKViT2l9gCy3dbGWKBsP3m-43Y",{"id":223,"title":224,"author":28,"body":225,"createdAt":293,"description":294,"extension":15,"img":295,"meta":296,"navigation":19,"path":297,"seo":298,"stem":299,"tags":300,"updatedAt":293,"__hash__":301},"articles\u002Farticles\u002Fupdate-npm-on-windows–current-best-approach.md","Update npm on Windows–Current Best Approach",{"type":8,"value":226,"toc":291},[227,233,236,242,253],[32,228,229,230,232],{},"This is the new best way to upgrade ",[65,231,18],{}," on Windows.",[32,234,235],{},"Run PowerShell as Administrator",[237,238,239],"pre",{},[71,240,241],{},"Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force\nnpm install -g npm-windows-upgrade\nnpm-windows-upgrade",[32,243,244,245,248,249,252],{},"Note: Do not run ",[71,246,247],{},"npm i -g npm",". Instead use ",[71,250,251],{},"npm-windows-upgrade"," to update npm going forward. Also if you run the NodeJS installer, it will replace the node version.",[47,254,255,258,265,268,271,274,280],{},[50,256,257],{},"Upgrades npm in-place, where node installed it.",[50,259,260,261,264],{},"Easy updating, update to the latest by running ",[71,262,263],{},"npm-windows-upgrade -p -v latest",".",[50,266,267],{},"Does not modify the default path.",[50,269,270],{},"Does not change the default global package location.",[50,272,273],{},"Allows easy upgrades and downgrades.",[50,275,276,264],{},[36,277,279],{"href":278},"https:\u002F\u002Fgithub.com\u002Fnpm\u002Fnpm\u002Fwiki\u002FTroubleshooting#upgrading-on-windows","Officially recommended by the NPM team",[50,281,282,283,286,287,290],{},"A list of versions matched between NPM and NODE (",[36,284,285],{"href":285},"https:\u002F\u002Fnodejs.org\u002Fen\u002Fdownload\u002Freleases\u002F",") - but you will need to download NODE INSTALLER and run that to update node (",[36,288,289],{"href":289},"https:\u002F\u002Fnodejs.org\u002Fen\u002F",")",{"title":11,"searchDepth":12,"depth":12,"links":292},[],"2018-10-23T18:23:21.082Z","This is the new best way to upgrade npm on Windows","\u002Farticles\u002Fimages\u002Fsingleton_thumb.png",{},"\u002Farticles\u002Fupdate-npm-on-windows-current-best-approach",{"title":224,"description":294},"articles\u002Fupdate-npm-on-windows–current-best-approach",[18],"o4jaqV350CYl-Sj4Y9dUejcdC7WPqrJ9gzKLdNfnykg",1781574759941]