[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"navigation":3,"url-settings":86,"blog-\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs":663,"blog-author-\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs":1441,"i-material-symbols:arrow-back-rounded":1453},{"id":4,"extension":5,"footer":6,"header":73,"meta":83,"stem":84,"__hash__":85},"navigation\u002Fdata\u002Fshared\u002Fnavigation.yml","yml",{"brand":7,"columns":13,"legal":63},{"name":8,"tagline":9,"downloadCta":10},"Pieces","The memory layer for modern work.",{"label":11,"href":12},"All downloads","\u002Fdownloads",[14,26,39,51],{"title":15,"links":16},"Product",[17,20,23],{"label":18,"href":19},"Pieces Desktop","\u002F",{"label":21,"href":22},"Pieces Enterprise","\u002Fenterprise",{"label":24,"href":25},"Pieces MCP","\u002Fmcp",{"title":27,"links":28},"Resources",[29,33,36],{"label":30,"href":31,"external":32},"Documentation","url:docs.home",true,{"label":34,"href":35},"Blog","\u002Fblog",{"label":37,"href":38,"external":32},"GitHub","url:github.org",{"title":40,"links":41},"Community",[42,45,48],{"label":43,"href":44,"external":32},"Discord","url:social.discord",{"label":46,"href":47,"external":32},"X \u002F Twitter","url:social.x",{"label":49,"href":50,"external":32},"LinkedIn","url:social.linkedin",{"title":52,"links":53},"Company",[54,57,60],{"label":55,"href":56},"About","\u002Fabout",{"label":58,"href":59},"Updates","\u002Fupdates",{"label":61,"href":62},"Contact","\u002Fcontact",[64,67,70],{"label":65,"href":66},"Privacy Policy","\u002Flegal\u002Fprivacy",{"label":68,"href":69},"Refund Policy","\u002Flegal\u002Frefund",{"label":71,"href":72},"Terms of Service","\u002Flegal\u002Fterms",{"links":74,"signIn":75,"contact":78,"cta":80},[],{"label":76,"href":77},"Sign in","url:portal.home",{"label":79,"href":62},"Get in touch",{"label":81,"href":82},"Download","url:routes.downloads",{},"data\u002Fshared\u002Fnavigation","VdirGIa8cUm6xLprbBeTKcw914JfyJjWfF-9hSVOX5Y",{"id":87,"extension":5,"links":88,"meta":660,"stem":661,"__hash__":662},"urlSettings\u002Fdata\u002Fshared\u002Furls.yml",[89,93,97,101,105,109,113,117,121,125,129,133,137,141,145,149,153,157,161,165,169,173,177,181,185,189,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276,280,284,288,292,295,299,303,306,310,314,318,322,326,330,334,338,342,346,350,354,358,362,366,370,374,378,382,386,390,394,398,402,406,410,414,418,422,426,430,434,438,442,446,450,453,457,461,465,469,473,477,480,483,486,489,493,497,500,504,508,512,516,520,524,528,532,536,540,544,548,551,555,559,563,567,571,574,577,580,584,587,591,595,599,603,606,610,614,617,620,623,627,631,635,638,641,644,648,652,656],{"key":90,"label":91,"href":92},"downloads.desktop","Desktop download page","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fdownload",{"key":94,"label":95,"href":96},"downloads.macOS.dmgArm64","macOS DMG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fdmg-arm64\u002Fdownload",{"key":98,"label":99,"href":100},"downloads.macOS.dmgIntel","macOS DMG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fdmg\u002Fdownload",{"key":102,"label":103,"href":104},"downloads.macOS.pkg","macOS PKG","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg\u002Fdownload",{"key":106,"label":107,"href":108},"downloads.macOS.universal","Desktop macOS Universal","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fmacos-universal\u002Fdownload",{"key":110,"label":111,"href":112},"downloads.macOS.pkgArm64","Desktop macOS PKG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pfd-arm64\u002Fdownload",{"key":114,"label":115,"href":116},"downloads.macOS.pkgIntel","Desktop macOS PKG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pfd\u002Fdownload",{"key":118,"label":119,"href":120},"downloads.windows.appinstaller","Windows App Installer","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fappinstaller\u002Fpieces_for_x.appinstaller",{"key":122,"label":123,"href":124},"downloads.windows.exe","Windows EXE","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fwindows-exe\u002Fdownload",{"key":126,"label":127,"href":128},"downloads.windows.msix","Windows MSIX","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fwindows-msix\u002Fdownload",{"key":130,"label":131,"href":132},"downloads.windows.suiteManager","Windows Suite Manager","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_suite_windows\u002Fappinstaller\u002Fdownload",{"key":134,"label":135,"href":136},"downloads.linux.flatpakRepo","Linux Flatpak repository","https:\u002F\u002Fbuilds.pieces.app\u002Fpieces-flatpak-repo\u002Fpieces-flatpak.flatpakrepo",{"key":138,"label":139,"href":140},"downloads.linux.snapDesktop","Linux Snap Desktop","https:\u002F\u002Fsnapcraft.io\u002Fpieces-for-developers",{"key":142,"label":143,"href":144},"downloads.linux.snapPiecesOS","Linux Snap PiecesOS","https:\u002F\u002Fsnapcraft.io\u002Fpieces-os",{"key":146,"label":147,"href":148},"downloads.linux.snap","Desktop Linux Snap package","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fsnap\u002Fdownload",{"key":150,"label":151,"href":152},"downloads.piecesOS.macOS.dmgArm64","PiecesOS macOS DMG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fdmg-arm64\u002Fdownload",{"key":154,"label":155,"href":156},"downloads.piecesOS.macOS.dmgIntel","PiecesOS macOS DMG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fdmg\u002Fdownload",{"key":158,"label":159,"href":160},"downloads.piecesOS.macOS.universal","PiecesOS macOS Universal","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fmacos-universal\u002Fdownload",{"key":162,"label":163,"href":164},"downloads.piecesOS.macOS.pkgArm64","PiecesOS macOS PKG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pos-launch-only-arm64\u002Fdownload",{"key":166,"label":167,"href":168},"downloads.piecesOS.macOS.pkgIntel","PiecesOS macOS PKG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pos-launch-only\u002Fdownload",{"key":170,"label":171,"href":172},"downloads.piecesOS.windows.appinstaller","PiecesOS Windows App Installer","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fappinstaller\u002Fos_server.appinstaller",{"key":174,"label":175,"href":176},"downloads.piecesOS.windows.exe","PiecesOS Windows EXE","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fwindows-exe\u002Fdownload",{"key":178,"label":179,"href":180},"downloads.piecesOS.windows.msix","PiecesOS Windows MSIX","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fwindows-msix\u002Fdownload",{"key":182,"label":183,"href":184},"downloads.piecesOS.linux.snap","PiecesOS Linux Snap package","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fsnap\u002Fdownload",{"key":186,"label":187,"href":188},"downloads.combined.macOS.appleSilicon","Combined macOS installer Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-arm64\u002Fdownload",{"key":190,"label":191,"href":104},"downloads.combined.macOS.intel","Combined macOS installer Intel",{"key":193,"label":194,"href":195},"downloads.guides.macOS","macOS installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Fmacos-installation-guide",{"key":197,"label":198,"href":199},"downloads.guides.windows","Windows installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Fwindows-installation-guide",{"key":201,"label":202,"href":203},"downloads.guides.linux","Linux installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Flinux-installation-guide",{"key":205,"label":206,"href":207},"downloads.guides.piecesOS","PiecesOS manual installation","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Fmanual-installation",{"key":209,"label":210,"href":211},"extensions.chrome","Chrome extension","https:\u002F\u002Fchrome.google.com\u002Fwebstore\u002Fdetail\u002Fpieces-save-code-snippets\u002Figbgibhbfonhmjlechmeefimncpekepm",{"key":213,"label":214,"href":215},"extensions.firefox","Firefox add-on","https:\u002F\u002Faddons.mozilla.org\u002Fen-US\u002Ffirefox\u002Faddon\u002Fpieces-save-code-from-the-web\u002F",{"key":217,"label":218,"href":219},"extensions.edge","Edge add-on","https:\u002F\u002Fmicrosoftedge.microsoft.com\u002Faddons\u002Fdetail\u002Fpieces-save-code-snippet\u002Fhglfimcdgonaeeobjckfdabcldfidmim",{"key":221,"label":222,"href":223},"extensions.vscode","VS Code extension","https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=MeshIntelligentTechnologiesInc.pieces-vscode",{"key":225,"label":226,"href":227},"extensions.visualStudio","Visual Studio extension","https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=MeshIntelligentTechnologiesInc.PiecesVisualStudio",{"key":229,"label":230,"href":231},"extensions.jetbrains","JetBrains plugin","https:\u002F\u002Fplugins.jetbrains.com\u002Fplugin\u002F17328-pieces--save-search-share--reuse-code-snippets",{"key":233,"label":234,"href":235},"extensions.obsidian","Obsidian plugin","https:\u002F\u002Fobsidian.md\u002Fplugins?id=pieces-for-developers",{"key":237,"label":238,"href":239},"extensions.sublime","Sublime package","https:\u002F\u002Fpackagecontrol.io\u002Fpackages\u002FPieces",{"key":241,"label":242,"href":243},"extensions.neovim","Neovim plugin","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_neo_vim",{"key":245,"label":246,"href":247},"extensions.jupyterlab","JupyterLab plugin","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fjupyterlab-pieces",{"key":249,"label":250,"href":251},"extensions.cli","Pieces CLI","https:\u002F\u002Fpypi.org\u002Fproject\u002Fpieces-cli\u002F",{"key":253,"label":254,"href":255},"docs.home","Documentation home","https:\u002F\u002Fdocs.pieces.app",{"key":257,"label":258,"href":259},"docs.getStarted","Get started docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces",{"key":261,"label":262,"href":263},"docs.api","API docs","https:\u002F\u002Fdocs.pieces.app\u002Fapi",{"key":265,"label":266,"href":267},"docs.desktop.overview","Desktop overview","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop",{"key":269,"label":270,"href":271},"docs.desktop.onboarding","Desktop onboarding","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fonboarding",{"key":273,"label":274,"href":275},"docs.desktop.timeline","Desktop timeline docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Ftimeline",{"key":277,"label":278,"href":279},"docs.desktop.summaries","Desktop summaries docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fsingle-click-summaries",{"key":281,"label":282,"href":283},"docs.desktop.search","Desktop conversational search docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fconversational-search",{"key":285,"label":286,"href":287},"docs.desktop.drive","Desktop drive docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fdrive",{"key":289,"label":290,"href":291},"docs.desktop.account","Desktop account settings docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fconfiguration\u002Faccount",{"key":293,"label":294,"href":92},"docs.desktop.download","Desktop download docs",{"key":296,"label":297,"href":298},"docs.piecesOS.overview","PiecesOS overview docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies",{"key":300,"label":301,"href":302},"docs.piecesOS.details","PiecesOS details docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os",{"key":304,"label":305,"href":207},"docs.piecesOS.install","PiecesOS install docs",{"key":307,"label":308,"href":309},"docs.piecesOS.quickMenu","PiecesOS quick menu docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Fquick-menu",{"key":311,"label":312,"href":313},"docs.piecesOS.storage","On-device storage docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fon-device-storage",{"key":315,"label":316,"href":317},"docs.piecesOS.troubleshooting","PiecesOS troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Ftroubleshooting",{"key":319,"label":320,"href":321},"docs.mcp.overview","MCP overview docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp",{"key":323,"label":324,"href":325},"docs.mcp.cursor","MCP Cursor docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcursor",{"key":327,"label":328,"href":329},"docs.mcp.vscode","MCP VS Code docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fvs-code",{"key":331,"label":332,"href":333},"docs.mcp.claudeDesktop","MCP Claude Desktop docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-desktop",{"key":335,"label":336,"href":337},"docs.mcp.claudeCode","MCP Claude Code docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-code",{"key":339,"label":340,"href":341},"docs.mcp.claudeCowork","MCP Claude Cowork docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-cowork",{"key":343,"label":344,"href":345},"docs.mcp.githubCopilot","MCP GitHub Copilot docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgithub-copilot",{"key":347,"label":348,"href":349},"docs.mcp.goose","MCP Goose docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgoose",{"key":351,"label":352,"href":353},"docs.mcp.windsurf","MCP Windsurf docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fwindsurf",{"key":355,"label":356,"href":357},"docs.mcp.zed","MCP Zed docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fzed",{"key":359,"label":360,"href":361},"docs.mcp.jetbrains","MCP JetBrains docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fjetbrains-ides",{"key":363,"label":364,"href":365},"docs.mcp.continueDev","MCP Continue docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcontinue-dev",{"key":367,"label":368,"href":369},"docs.mcp.cline","MCP Cline docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcline",{"key":371,"label":372,"href":373},"docs.mcp.raycast","MCP Raycast docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fraycast",{"key":375,"label":376,"href":377},"docs.mcp.rovoDevCli","MCP Rovo Dev CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Frovo-dev-cli",{"key":379,"label":380,"href":381},"docs.mcp.openaiCodexCli","MCP OpenAI Codex CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fopenai-codex-cli",{"key":383,"label":384,"href":385},"docs.mcp.googleGeminiCli","MCP Google Gemini CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgoogle-gemini-cli",{"key":387,"label":388,"href":389},"docs.mcp.amazonQ","MCP Amazon Q docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Famazon-q-developer",{"key":391,"label":392,"href":393},"docs.mcp.chatgptDev","MCP ChatGPT Developer Mode docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fchatgpt-developer-mode",{"key":395,"label":396,"href":397},"docs.mcp.openclaw","MCP OpenClaw docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fopenclaw",{"key":399,"label":400,"href":401},"docs.mcp.mcpRemote","MCP Remote docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fmcp-remote",{"key":403,"label":404,"href":405},"docs.mcp.ngrok","MCP ngrok docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fngrok-setup",{"key":407,"label":408,"href":409},"docs.troubleshooting.macOS","macOS troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Fmacos",{"key":411,"label":412,"href":413},"docs.troubleshooting.windows","Windows troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Fwindows",{"key":415,"label":416,"href":417},"docs.troubleshooting.linux","Linux troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Flinux",{"key":419,"label":420,"href":421},"docs.privacy","Privacy and security docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fprivacy-security-your-data",{"key":423,"label":424,"href":425},"docs.support","Support docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fsupport",{"key":427,"label":428,"href":429},"portal.home","Pieces portal","https:\u002F\u002Fportal.pieces.app",{"key":431,"label":432,"href":433},"site.home","Website home","https:\u002F\u002Fpieces.app",{"key":435,"label":436,"href":437},"site.about","About page","https:\u002F\u002Fpieces.app\u002Fabout",{"key":439,"label":440,"href":441},"site.features","Features page","https:\u002F\u002Fpieces.app\u002Ffeatures",{"key":443,"label":444,"href":445},"site.plugins","Plugins page","https:\u002F\u002Fpieces.app\u002Fplugins",{"key":447,"label":448,"href":449},"site.contact","Contact page","https:\u002F\u002Fpieces.app\u002Fcontact",{"key":451,"label":58,"href":452},"site.updates","https:\u002F\u002Fpieces.app\u002Fupdates",{"key":454,"label":455,"href":456},"site.news","News","https:\u002F\u002Fpieces.app\u002Fnews",{"key":458,"label":459,"href":460},"site.events","Community events","https:\u002F\u002Fpieces.app\u002Fcommunity\u002Fevents",{"key":462,"label":463,"href":464},"site.userStories","User stories","https:\u002F\u002Fpieces.app\u002Fuser-stories",{"key":466,"label":467,"href":468},"site.academy","Academy","https:\u002F\u002Fpieces.app\u002Flearn\u002Facademy",{"key":470,"label":471,"href":472},"site.support","Website support","https:\u002F\u002Fpieces.app\u002Fsupport",{"key":474,"label":475,"href":476},"site.standup","Standup","https:\u002F\u002Fpieces.app\u002Fstandup",{"key":478,"label":34,"href":479},"site.blog","https:\u002F\u002Fcode.pieces.app\u002Fblog",{"key":481,"label":43,"href":482},"social.discord","https:\u002F\u002Fdiscord.gg\u002Fgetpieces",{"key":484,"label":46,"href":485},"social.x","https:\u002F\u002Fx.com\u002Fgetpieces",{"key":487,"label":488,"href":485},"social.twitter","Twitter",{"key":490,"label":491,"href":492},"social.instagram","Instagram","https:\u002F\u002Fwww.instagram.com\u002Fgetpieces\u002F",{"key":494,"label":495,"href":496},"social.tiktok","TikTok","https:\u002F\u002Fwww.tiktok.com\u002F@getpieces",{"key":498,"label":49,"href":499},"social.linkedin","https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Fgetpieces\u002F",{"key":501,"label":502,"href":503},"social.youtube","YouTube","https:\u002F\u002Fyoutube.com\u002F@getpieces",{"key":505,"label":506,"href":507},"github.org","GitHub organization","https:\u002F\u002Fgithub.com\u002Fpieces-app",{"key":509,"label":510,"href":511},"github.support","GitHub support","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport",{"key":513,"label":514,"href":515},"github.issues","GitHub issues","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport\u002Fissues",{"key":517,"label":518,"href":519},"github.discussions","GitHub discussions","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport\u002Fdiscussions",{"key":521,"label":522,"href":523},"github.documentation","GitHub documentation","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fdocumentation",{"key":525,"label":526,"href":527},"github.opensource","GitHub open source","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fopensource",{"key":529,"label":530,"href":531},"github.sdks.python","Python SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-python",{"key":533,"label":534,"href":535},"github.sdks.typescript","TypeScript SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-typescript",{"key":537,"label":538,"href":539},"github.sdks.dart","Dart SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-dart",{"key":541,"label":542,"href":543},"github.sdks.kotlin","Kotlin SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-kotlin",{"key":545,"label":546,"href":547},"github.plugins.obsidian","Obsidian plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fobsidian-pieces",{"key":549,"label":550,"href":247},"github.plugins.jupyterlab","JupyterLab plugin repository",{"key":552,"label":553,"href":554},"github.plugins.sublime","Sublime plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_sublime",{"key":556,"label":557,"href":558},"github.plugins.neovim","Neovim plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_neovim",{"key":560,"label":561,"href":562},"github.cliAgent","CLI agent repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fcli-agent",{"key":564,"label":565,"href":566},"github.mcpDart","MCP Dart repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fmcp_dart",{"key":568,"label":569,"href":570},"github.awesomePieces","Awesome Pieces repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fawesome-pieces",{"key":572,"label":573,"href":66},"legal.privacyPolicy","Privacy policy",{"key":575,"label":576,"href":69},"legal.refundPolicy","Refund policy",{"key":578,"label":579,"href":72},"legal.terms","Terms",{"key":581,"label":582,"href":583},"legal.security","Legal security","https:\u002F\u002Fpieces.app\u002Flegal\u002Fsecurity",{"key":585,"label":586,"href":503},"videos.youtubeChannel","YouTube channel",{"key":588,"label":589,"href":590},"videos.gettingStartedDesktop","Getting started desktop video","https:\u002F\u002Fyoutu.be\u002FdUr1lRM_TYk",{"key":592,"label":593,"href":594},"videos.snippetDiscoveryxR","Snippet discovery video","https:\u002F\u002Fyoutu.be\u002FG6vb1USw-30",{"key":596,"label":597,"href":598},"sales.bookACall","Book a sales call","https:\u002F\u002Fcalendar.app.google\u002FWVUDtUfNy5Vst3sH7",{"key":600,"label":601,"href":602},"sales.enterprise","Enterprise form","https:\u002F\u002Fgetpieces.typeform.com\u002Fto\u002FaVQFTvpE",{"key":604,"label":605,"href":519},"sales.feedback","Feedback discussions",{"key":607,"label":608,"href":609},"sales.earlyAccess","Early access form","https:\u002F\u002Fgetpieces.typeform.com\u002Fearlyaccess",{"key":611,"label":612,"href":613},"sales.supportEmail","Support email","mailto:support@pieces.app",{"key":615,"label":616,"href":19},"routes.home","Home route",{"key":618,"label":619,"href":56},"routes.about","About route",{"key":621,"label":622,"href":12},"routes.downloads","Downloads route",{"key":624,"label":625,"href":626},"routes.thanks","Post-install thanks route","\u002Finstall\u002Fthanks",{"key":628,"label":629,"href":630},"routes.pricing","Pricing route","\u002Fpricing",{"key":632,"label":633,"href":634},"cta.freeTrial","Start free trial CTA (Pieces Pro) — used by \u002Fcampaigns\u002F* landing pages","https:\u002F\u002Fcampaigns.pieces.app\u002F",{"key":636,"label":637,"href":22},"routes.enterprise","Enterprise route",{"key":639,"label":640,"href":62},"routes.contact","Contact route",{"key":642,"label":643,"href":59},"routes.updates","Updates route",{"key":645,"label":646,"href":647},"routes.migrationError","Migration error route","\u002Fmigration\u002Ferror",{"key":649,"label":650,"href":651},"routes.authenticated","Post-login authenticated route","\u002Fauth\u002Fsigned-in",{"key":653,"label":654,"href":655},"routes.signed-out","Signed out route","\u002Fauth\u002Fsigned-out",{"key":657,"label":658,"href":659},"routes.authentication-error","Authentication error route","\u002Fauth\u002Ferror",{},"data\u002Fshared\u002Furls","NLkVE1lIUws518K-1QsSB6T-GvlXYIzcRL1HDhqarGQ",{"id":664,"title":665,"author":666,"authorPhoto":667,"authorPhotoAlt":668,"authorSlug":669,"body":670,"buttonText":668,"buttonUrl":668,"category":1427,"date":1428,"description":1429,"draft":1430,"editorsPick":1430,"extension":1431,"featured":1430,"image":1432,"imageAlt":1433,"meta":1434,"navigation":32,"ogImage":668,"ogImageAlt":668,"path":1435,"seo":1436,"stem":1437,"tags":1438,"__hash__":1440},"blog\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs.md","Exploring Methods of Creating SLL HTTPS for Localhost in Node.JS","Peter Osah","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fauthors\u002Fisaac-junior.svg",null,"peter-osah",{"type":671,"value":672,"toc":1405},"minimark",[673,678,682,686,697,701,714,719,722,725,733,743,750,753,760,763,767,781,787,792,798,807,813,816,820,823,834,840,846,852,858,864,872,878,881,884,890,896,898,904,907,910,916,922,930,936,942,945,949,952,958,964,982,988,991,1001,1007,1013,1017,1020,1026,1032,1035,1041,1047,1054,1060,1066,1080,1083,1089,1095,1099,1108,1114,1117,1120,1136,1142,1148,1154,1157,1161,1168,1174,1177,1182,1185,1191,1194,1198,1204,1208,1213,1220,1225,1231,1237,1243,1250,1254,1261,1265,1272,1276,1279,1285,1291,1297,1300,1303,1309,1315,1318,1324,1330,1333,1353,1359,1365,1370,1373,1378,1380,1383,1386,1391,1393,1397],[674,675,677],"h2",{"id":676},"goals","Goals:",[679,680,681],"p",{},"This article aims to educate developers, particularly beginners and intermediate developers, on ways to configure SSL HTTPS on a local development Node.js Express backend.",[674,683,685],{"id":684},"overview","Overview:",[679,687,688,689,696],{},"We will configure SSL HTTPS with the aid of a self-signed certificate on our local machine. Note that this procedure should be done only in a local\u002Fdevelopment environment! In a production environment, it’s best to obtain a certificate from a third-party Certificate Authority like letsEncrypt, Certbot, and so on. To obtain more information about a Certificate Authority, check out ",[690,691,695],"a",{"href":692,"rel":693},"https:\u002F\u002Faboutssl.org\u002Fcertificate-authority\u002F",[694],"nofollow","this explainer",".",[674,698,700],{"id":699},"generate-ssl-https-using-openssl","Generate SSL HTTPS using OpenSSL",[679,702,703,708,709,696],{},[690,704,707],{"href":705,"rel":706},"https:\u002F\u002Fwww.openssl.org\u002F",[694],"OpenSSL"," is a cross-platform, open-source tool used for most cryptographic and network communication operations. However, OpenSSL is available by default only in most Linux distributions and macOS systems. Hence, Windows users will have to directly install OpenSSL in order to use it. You can learn how to install OpenSSL on Windows with ",[690,710,713],{"href":711,"rel":712},"https:\u002F\u002Fthesecmaster.com\u002Fprocedure-to-install-openssl-on-the-windows-platform\u002F",[694],"these step-by-step instructions",[715,716,718],"h3",{"id":717},"create-a-certificate-key","Create a Certificate Key",[679,720,721],{},"SSL certificates are typically signed by Certificate Authorities, which are trusted, third-party organizations. Before issuing any certificate, they conduct a thorough check on a website or web app in order to ascertain its owner, function, and use.",[679,723,724],{},"However, no Certificate Authority issues a certificate for localhost because no one owns it. So, we’ll simulate the signing process that Certificate Authorities use on our local machine.",[679,726,727,728,732],{},"Let’s create a ",[729,730,731],"code",{},"certificate key"," by typing the following commands in sequence:",[734,735,740],"pre",{"className":736,"code":738,"language":739},[737],"language-text","$ mkdir ssl-cert\n$ cd ssl-cert\n$ mkdir Cert-Auth\n$ cd Cert-Auth\n$ openssl genrsa -out Cert-Auth.key -des3 2048\n","text",[729,741,738],{"__ignoreMap":742},"",[679,744,745],{},[690,746,749],{"href":747,"rel":748},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=afcd46a010",[694],"Save this code",[679,751,752],{},"The commands above will generate a private key and ask for a simple passphrase. The user will enter and re-enter the passphrase for confirmation.",[679,754,755],{},[756,757],"img",{"alt":758,"src":759},"private key and passphrase","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fimg-001.png",[679,761,762],{},"Creating a certificate on macOS.",[715,764,766],{"id":765},"generate-a-certificate-authority-pem-file","Generate a Certificate Authority (.pem) file",[679,768,769,770,772,773,776,777,780],{},"Upon creating a ",[729,771,731],{},", we’ll create a ",[729,774,775],{},"certificate authority pem file",". We need this file to create the ",[729,778,779],{},"certificate(.crt)"," file.",[679,782,783,784,786],{},"To create the ",[729,785,779],{}," file, type the command below:",[679,788,789],{},[729,790,791],{},"$ openssl req -x509 -sha256 -new -nodes -days 365 -key Cert-Auth.key -out Cert-Auth.pem",[679,793,794],{},[690,795,749],{"href":796,"rel":797},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=60ff4e9bb5",[694],[679,799,800,801,803,804,696],{},"In the command above, we used the already created ",[729,802,731],{}," to generate the ",[729,805,806],{},"certificate pem file",[679,808,809],{},[756,810],{"alt":811,"src":812},"private key and passphrase in the terminal","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fimg-002.png",[679,814,815],{},"Generating a certificate authority pem file on macOS",[715,817,819],{"id":818},"generate-a-certificate-signing-requestcsr-file","Generate a Certificate Signing Request(.csr) file",[679,821,822],{},"The Certificate Authority (CA) key and CA certificate have now been generated. Since we've already created a CA, we can sign SSL certificates.",[679,824,825,826,829,830,833],{},"Next, we create a new directory called localhost in the root (",[729,827,828],{},"ssl-cert",") directory. Create a new file, ",[729,831,832],{},"localhost.ext",", inside localhost.",[734,835,838],{"className":836,"code":837,"language":739},[737],"$ mkdir localhost\n$ cd localhost\n$ touch localhost.ext\n",[729,839,837],{"__ignoreMap":742},[679,841,842],{},[690,843,749],{"href":844,"rel":845},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=3a994dbe14",[694],[679,847,848,849,851],{},"After creating the ",[729,850,832],{}," file, we will open the file and add the code snippets below to it.",[734,853,856],{"className":854,"code":855,"language":739},[737],"authorityKeyIdentifier = keyid,issuer\nbasicConstraints = CA:FALSE\nkeyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment\nsubjectAltName = @alt_names\n[alt_names]\nDNS.1 = localhost\nIP.1 = 127.0.0.1\n",[729,857,855],{"__ignoreMap":742},[679,859,860],{},[690,861,749],{"href":862,"rel":863},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=322c448827",[694],[679,865,866,867,696],{},"The code above simply sets the configuration that our SSL certificate will contain. Our certificate works for localhost and also 127.0.0.1. More domains can be added to this file if you want the certificate to work for other host addresses. To dive into this further, read ",[690,868,871],{"href":869,"rel":870},"https:\u002F\u002Fgist.github.com\u002Fcecilemuller\u002F9492b848eb8fe46d462abeb26656c4f8#domain-name-certificate",[694],"this article",[679,873,874],{},[756,875],{"alt":876,"src":877},"localhost nano in the terminal","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fimg-003.png",[679,879,880],{},"Adding contents to localhost.ext file on macOS",[679,882,883],{},"After editing the localhost.ext file, we will generate the certificate signing request (CSR). The command below will be used to create a key, which will then be used to generate a CSR.",[734,885,888],{"className":886,"code":887,"language":739},[737],"$ openssl genrsa -out localhost.key -des3 2048\n",[729,889,887],{"__ignoreMap":742},[679,891,892],{},[690,893,749],{"href":894,"rel":895},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=c1944cbf33",[694],[679,897,752],{},[679,899,900],{},[756,901],{"alt":902,"src":903},"re-entering the passphrase in the terminal for confirmation","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fimg-004.png",[679,905,906],{},"Generating a private key for the CSR Request on macOS",[679,908,909],{},"Once you’ve done that, type the below command to generate the CSR:",[734,911,914],{"className":912,"code":913,"language":739},[737],"$ openssl req -new -key localhost.key -out localhost.csr\n",[729,915,913],{"__ignoreMap":742},[679,917,918],{},[690,919,749],{"href":920,"rel":921},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=89544b867a",[694],[679,923,924,925,929],{},"The commands above will generate a CSR and ask for certain pieces of information. They will also request a challenge password. A \"",[926,927,928],"strong",{},"challenge password","\" is essentially an embedded, one-time shared secret between you and the SSL certificate issuer (CA) that the issuer may use to authenticate you should that ever be necessary.",[679,931,932,933,935],{},"Note the requested challenge password can be anything, but it should be a “",[926,934,926],{},"” password.",[679,937,938],{},[756,939],{"alt":940,"src":941},"requested challenge password in the terminal","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fimg-005.png",[679,943,944],{},"Generating a CSR on macOS",[715,946,948],{"id":947},"generate-a-certificatecrt-file","Generate a Certificate(.crt) File",[679,950,951],{},"We can now use our CSR to ask the CA to sign a certificate. It should be noted that the location from which the user executes commands affects the paths for the CA.key and CA.pem files (relative paths).",[734,953,956],{"className":954,"code":955,"language":739},[737],"$ openssl x509 -req -in localhost.csr -CA ..\u002FCA.pem -CAkey ..\u002FCA.key -CAcreateserial -days 365 -sha256 -extfile localhost.ext -out localhost.crt\n",[729,957,955],{"__ignoreMap":742},[679,959,960],{},[690,961,749],{"href":962,"rel":963},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=3ad946bdc6",[694],[679,965,966,967,970,971,974,975,978,979,981],{},"This command accepts the certificate extensions file, the CA certificate (",[729,968,969],{},"Cert-Auth.pem"," and ",[729,972,973],{},"Cert-Auth.key","), and the CSR (",[729,976,977],{},"localhost.csr",") (",[729,980,832],{},"). These parameters produce a localhost.crt certificate file that is valid for one year.",[679,983,984],{},[756,985],{"alt":986,"src":987},"CA certificate and the CSR in the terminal","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fimg-006.png",[679,989,990],{},"Generating a CSR file on MacOS",[679,992,993,994,997,998,1000],{},"We will decrypt ",[729,995,996],{},"localhost.key"," since our ",[729,999,996],{}," is in encrypted form. we will do this with the command below:",[734,1002,1005],{"className":1003,"code":1004,"language":739},[737],"$ openssl rsa -in localhost.key -out localhost.decrypted.key\n",[729,1006,1004],{"__ignoreMap":742},[679,1008,1009],{},[690,1010,749],{"href":1011,"rel":1012},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=6ff345b937",[694],[674,1014,1016],{"id":1015},"develop-a-server-using-nodejs-that-is-being-served-up-utilizing-a-localhost-ssl-certificate","Develop a server using Node.js that is being served up utilizing a localhost SSL certificate",[679,1018,1019],{},"In order to test the certificate, we will create a Node.js application with express installed. To do this, we will type the commands below in sequence:",[734,1021,1024],{"className":1022,"code":1023,"language":739},[737],"$ mkdir ssl-nodejs\n$ cd ssl-nodejs\n$ npm init -y\n$ npm i express\n$ touch index.js\n",[729,1025,1023],{"__ignoreMap":742},[679,1027,1028],{},[690,1029,749],{"href":1030,"rel":1031},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=b7294db60f",[694],[679,1033,1034],{},"Upon installing the Node.js application, we will create an Express app with a “get” API route that simply outputs “hello world” upon a visit to the route.",[734,1036,1039],{"className":1037,"code":1038,"language":739},[737],"const express = require('express');\nconst app = express();\napp.use(express.json())\napp.get('\u002F', (req, res)=> {\n res.send('hello world')\n})\nmodule.exports = app\n",[729,1040,1038],{"__ignoreMap":742},[679,1042,1043],{},[690,1044,749],{"href":1045,"rel":1046},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=9d8d469538",[694],[679,1048,1049,1050,1053],{},"We will also import the Express app to our ",[729,1051,1052],{},"index.js file"," and use it to create the server.",[734,1055,1058],{"className":1056,"code":1057,"language":739},[737],"const http = require('http');\nconst fs = require(\"fs\")\nconst { getDesktopFolder } = require('platform-folders')\nconst path = require(\"path\")\nconst https = require('https')\nconst app = require('.\u002Fapp')\nconst server = https.createServer({\n key: fs.readFileSync(`${getDesktopFolder()}\u002Fssl-cert\u002Flocalhost\u002Flocalhost.decrypted.key`),\n cert: fs.readFileSync(`${getDesktopFolder()}\u002Fssl-cert\u002Flocalhost\u002Flocalhost.crt`)\n}, app)\nserver.listen(3000, ()=> {\n console.log('port running on', 3000)\n})\n",[729,1059,1057],{"__ignoreMap":742},[679,1061,1062],{},[690,1063,749],{"href":1064,"rel":1065},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=9ae640967f",[694],[679,1067,1068,1069,1072,1073,970,1076,1079],{},"Also, we added the dependency ",[729,1070,1071],{},"platform-folders"," which simply locates the absolute path of the desktop folder. Accompanied by the filesystem module, we will use this package to locate the ",[729,1074,1075],{},"localhost.decrypted.key",[729,1077,1078],{},"localhost.crt files"," on our PC from an absolute path.",[679,1081,1082],{},"After creating the server, start it using the below command:",[734,1084,1087],{"className":1085,"code":1086,"language":739},[737],"$ node index.js\n",[729,1088,1086],{"__ignoreMap":742},[679,1090,1091],{},[690,1092,749],{"href":1093,"rel":1094},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=29f34cbda7",[694],[674,1096,1098],{"id":1097},"configure-the-chrome-web-browser-and-the-postman-api-client-to-allow-certificates-we-signed-as-the-certificate-authority-ca","Configure the Chrome web browser and the Postman API client to allow certificates we signed as the Certificate Authority (CA)",[679,1100,1101,1102,1107],{},"Now that our server is serving up the SSL, we can test our ",[690,1103,1106],{"href":1104,"rel":1105},"https:\u002F\u002Flocalhost:3000\u002F",[694],"https:\u002F\u002Flocalhost:3000"," link in our Chrome browser as shown below:",[679,1109,1110],{},[756,1111],{"alt":1112,"src":1113},"chrome window showing an alert that communicates that the user's connection is not private","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fimg-007.png",[679,1115,1116],{},"Localhost run in the browser",[679,1118,1119],{},"Even after serving up our localhost with SSL and inspecting the signed certificate, Chrome does not trust the CA that signed this certificate. This is correct behavior, because we signed it locally and didn’t use a third-party trusted Certificate Authority. Since this is for development purposes, we want to access localhost with our self-signed certificate.",[679,1121,1122,1123,1128,1129,1132,1133,696],{},"Therefore, we will access the ",[690,1124,1127],{"href":1125,"rel":1126},"http:\u002F\u002Fchrome\u002F\u002Fflags\u002F#allow-insecure-localhost",[694],"chrome:\u002F\u002Fflags\u002F#allow-insecure-localhost"," URL on our Chrome browser and toggle the ",[729,1130,1131],{},"Allow invalid certificates for resources loaded from localhost"," button to ",[729,1134,1135],{},"enabled",[679,1137,1138],{},[756,1139],{"alt":1140,"src":1141},"localhost URL on Chrome browser to enable the allow invalid certificates for resources loaded from localhost","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fimg-008.png",[679,1143,1144,1147],{},[926,1145,1146],{},"N\u002FB:"," This should not be done in production. However, we do this for development purposes in order to view the response on localhost from the browser.",[679,1149,1150],{},[756,1151],{"alt":1152,"src":1153},"chrome browser page showing 'hello world'","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fimg-009.png",[679,1155,1156],{},"The response on localhost",[674,1158,1160],{"id":1159},"access-localhost-with-https-from-the-browser-and-the-postman-api-client","Access localhost with HTTPS from the browser and the Postman API client",[679,1162,1163,1164,1167],{},"From Postman, access ",[729,1165,1166],{},"SSL certificate verification"," in the general settings and make sure that SSL certificate verification is turned off.",[679,1169,1170],{},[756,1171],{"alt":1172,"src":1173},"SSL certificate verification in Postman","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fimg-010.png",[679,1175,1176],{},"Toggling SSL certificate verification in Postman’s general settings page",[679,1178,1179,1181],{},[926,1180,1146],{}," This is not advised to be done on production. However, we do this for development purposes in order to view the response of localhost on Postman.",[679,1183,1184],{},"Once this is done, we can access the HTTPS localhost on Postman.",[679,1186,1187],{},[756,1188],{"alt":1189,"src":1190},"access the HTTPS localhost on Postman","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fimg-011.png",[679,1192,1193],{},"Accessibility https localhost on Postman",[674,1195,1197],{"id":1196},"generate-ssl-https-using-mk-cert","Generate SSL HTTPS using MK-CERT",[679,1199,1200,1203],{},[729,1201,1202],{},"mkcert"," is a simple tool used for making locally trusted development certificates. It requires no configuration, as opposed to the OpenSSL method explored previously, which is an advantage.",[715,1205,1207],{"id":1206},"installing-mk-cert","Installing MK-CERT",[1209,1210,1212],"h4",{"id":1211},"macos","macOs:",[679,1214,1215,1216,1219],{},"We’ll use Homebrew to install ",[729,1217,1218],{},"mk-cert"," on macOS.",[679,1221,1222],{},[729,1223,1224],{},"brew install mkcert",[679,1226,1227],{},[690,1228,749],{"href":1229,"rel":1230},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=f27c4a887d",[694],[679,1232,1233],{},[756,1234],{"alt":1235,"src":1236},"using homebrew to install mk-vert on macos","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fimg-012.png",[734,1238,1241],{"className":1239,"code":1240,"language":739},[737],"mk-cert installation on macOS\n",[729,1242,1240],{"__ignoreMap":742},[679,1244,1245],{},[690,1246,1249],{"href":1247,"rel":1248},"https:\u002F\u002Fgithub.com\u002FFiloSottile\u002Fmkcert#macos",[694],"See more installation options for macOS.",[1209,1251,1253],{"id":1252},"linux","Linux",[679,1255,1256],{},[690,1257,1260],{"href":1258,"rel":1259},"https:\u002F\u002Fgithub.com\u002FFiloSottile\u002Fmkcert#linux",[694],"Install mkcert on Linux.",[1209,1262,1264],{"id":1263},"windows","Windows",[679,1266,1267],{},[690,1268,1271],{"href":1269,"rel":1270},"https:\u002F\u002Fgithub.com\u002FFiloSottile\u002Fmkcert#windows",[694],"Install mkcert on Windows.",[715,1273,1275],{"id":1274},"generate-an-ssl-for-localhost-using-mk-cert","Generate an SSL for localhost using MK-CERT",[679,1277,1278],{},"To create an SSL certificate for localhost, run the command below:",[734,1280,1283],{"className":1281,"code":1282,"language":739},[737],"mkcert localhost\n",[729,1284,1282],{"__ignoreMap":742},[679,1286,1287],{},[690,1288,749],{"href":1289,"rel":1290},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=4a7740ae87",[694],[679,1292,1293],{},[756,1294],{"alt":1295,"src":1296},"running a command to create an SSL certificate for localhost","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fimg-013.png",[679,1298,1299],{},"Creating a certificate for localhost",[679,1301,1302],{},"However, you can also chose to create a locally trusted CA by running the command:",[734,1304,1307],{"className":1305,"code":1306,"language":739},[737],"mkcert -install\n",[729,1308,1306],{"__ignoreMap":742},[679,1310,1311],{},[690,1312,749],{"href":1313,"rel":1314},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=1e444fbf64",[694],[679,1316,1317],{},"This creates a local CA which is only trusted by your device. To locate the path to the local CA, you can type the command below:",[734,1319,1322],{"className":1320,"code":1321,"language":739},[737],"mkcert -CAROOT\n",[729,1323,1321],{"__ignoreMap":742},[679,1325,1326],{},[690,1327,749],{"href":1328,"rel":1329},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=7f86499b04",[694],[715,1331,1016],{"id":1332},"develop-a-server-using-nodejs-that-is-being-served-up-utilizing-a-localhost-ssl-certificate-1",[679,1334,1335,1336,970,1339,1342,1343,1345,1346,970,1349,1352],{},"We’ll use our previous server example; however, we’ll make a few tweaks to the ",[729,1337,1338],{},"key",[729,1340,1341],{},"cert"," values passed into the server. ",[729,1344,1218],{}," generates ",[729,1347,1348],{},"localhost.pem",[729,1350,1351],{},"localhost-key.pem"," files for localhost, therefore, the parameters of key and cert on our server will now contain the file paths to the localhost.pem and localhost-key.pem files, respectively.",[734,1354,1357],{"className":1355,"code":1356,"language":739},[737],"const http = require('http');\nconst fs = require(\"fs\")\nconst { getDesktopFolder } = require('platform-folders')\nconst path = require(\"path\")\nconst https = require('https')\nconst app = require('.\u002Fapp')\nconst server = https.createServer({\n key: fs.readFileSync(`${getDesktopFolder()}\u002Fmk-cert-ssl\u002Flocalhost-key.pem`),\n cert: fs.readFileSync(`${getDesktopFolder()}\u002Fmk-cert-ssl\u002Flocalhost.pem`)\n}, app)\nserver.listen(3000, ()=> {\n console.log('port running on', 3000)\n})\n",[729,1358,1356],{"__ignoreMap":742},[679,1360,1361],{},[690,1362,749],{"href":1363,"rel":1364},"https:\u002F\u002Fmariah.pieces.cloud\u002F?p=9b6146a9d9",[694],[679,1366,1367],{},[926,1368,1369],{},"Configure the Chrome web browser and the Postman API client to allow certificates we have signed as the CA",[679,1371,1372],{},"Since we have already configured the web browser to view self-signed certificates, we can easily view the result below:",[679,1374,1375],{},[756,1376],{"alt":1377,"src":1153},"web browser showing 'hello world' webpage",[679,1379,1156],{},[715,1381,1160],{"id":1382},"access-localhost-with-https-from-the-browser-and-the-postman-api-client-1",[679,1384,1385],{},"We can access the HTTPS localhost on Postman as shown below:",[679,1387,1388],{},[756,1389],{"alt":1390,"src":1190},"screenshot showing accessing HTTPS localhost on Postman",[679,1392,1193],{},[674,1394,1396],{"id":1395},"conclusion","Conclusion",[679,1398,1399,1400,696],{},"In this article, we explored different ways of configuring SSL HTTPS on a local development Node.js Express backend and explained the terminologies used in certificate creation. To learn more about the certificate creation process, check out this in-depth ",[690,1401,1404],{"href":1402,"rel":1403},"https:\u002F\u002Fwww.digicert.com\u002Fkb\u002Fssl-support\u002Fopenssl-quick-reference-guide.htm",[694],"article",{"title":742,"searchDepth":1406,"depth":1406,"links":1407},2,[1408,1409,1410,1417,1418,1419,1420,1426],{"id":676,"depth":1406,"text":677},{"id":684,"depth":1406,"text":685},{"id":699,"depth":1406,"text":700,"children":1411},[1412,1414,1415,1416],{"id":717,"depth":1413,"text":718},3,{"id":765,"depth":1413,"text":766},{"id":818,"depth":1413,"text":819},{"id":947,"depth":1413,"text":948},{"id":1015,"depth":1406,"text":1016},{"id":1097,"depth":1406,"text":1098},{"id":1159,"depth":1406,"text":1160},{"id":1196,"depth":1406,"text":1197,"children":1421},[1422,1423,1424,1425],{"id":1206,"depth":1413,"text":1207},{"id":1274,"depth":1413,"text":1275},{"id":1332,"depth":1413,"text":1016},{"id":1382,"depth":1413,"text":1160},{"id":1395,"depth":1406,"text":1396},"Software Development","2022-12-09T00:00:00.000Z","This article aims to educate beginner and intermediate developers on ways to configure SSL HTTPS on a local development Node.js Express backend.",false,"md","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs\u002Fhero.jpeg","decorative cover image showing a fisheye view of a laptop screen with code on it",{},"\u002Fblog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs",{"title":665,"description":1429},"blog\u002Fexploring-methods-of-creating-sll-https-for-localhost-in-nodejs",[1439],"node-js; backend","QkSNhBQBdsy_HaUpRgwhR4auAeLgpx4bE29BWnKm_6g",{"id":1442,"title":666,"body":1443,"description":742,"draft":1430,"extension":1431,"meta":1447,"navigation":32,"path":1448,"photo":1449,"photoAlt":668,"seo":1450,"stem":1451,"__hash__":1452},"authors\u002Fauthors\u002Fpeter-osah.md",{"type":671,"value":1444,"toc":1445},[],{"title":742,"searchDepth":1406,"depth":1406,"links":1446},[],{},"\u002Fauthors\u002Fpeter-osah","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fauthors\u002Fpeter-osah.jpg",{"title":666,"description":742},"authors\u002Fpeter-osah","-fcQbzkw2abUYTE5doGkGknK3Zu2LBeUxGtg7cgU0VA",{"left":1454,"top":1454,"width":1455,"height":1455,"rotate":1454,"vFlip":1430,"hFlip":1430,"body":1456},0,24,"\u003Cpath fill=\"currentColor\" d=\"m7.825 13l4.9 4.9q.3.3.288.7t-.313.7q-.3.275-.7.288t-.7-.288l-6.6-6.6q-.15-.15-.213-.325T4.426 12t.063-.375t.212-.325l6.6-6.6q.275-.275.688-.275t.712.275q.3.3.3.713t-.3.712L7.825 11H19q.425 0 .713.288T20 12t-.288.713T19 13z\"\u002F>"]