{"id":411,"date":"2020-02-07T16:13:12","date_gmt":"2020-02-07T16:13:12","guid":{"rendered":"http:\/\/yer.ac\/blog\/?p=411"},"modified":"2020-02-07T16:13:17","modified_gmt":"2020-02-07T16:13:17","slug":"supporting-multiple-configurations-in-cypress","status":"publish","type":"post","link":"https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/","title":{"rendered":"Supporting multiple configurations in Cypress"},"content":{"rendered":"\n<p>By default, Cypress will support a single configuration based on the optional file <code>cypress.json<\/code> as described in their documentation <a href=\"https:\/\/docs.cypress.io\/guides\/references\/configuration.html\">here<\/a>. <\/p>\n\n\n\n<p>Whilst this works fine for most, it would be great if we could have access to a <code>cypress.dev.json<\/code> for local development, or even better, a whole host of configuration files for use against a multi-tenant environment  &#8211; for example <code>cypress.clientA.json<\/code>, <code>cypress.clientB.json<\/code> etc.<\/p>\n\n\n\n<p>Whilst Cypress accepts a different config file during startup with the <code>--config-file<\/code> flag, it would be better if we could just pass the environment name through instead of the full file name and\/or location, right?  <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Uses for environmental variables<\/h3>\n\n\n\n<p>I personally use these environmental files to store things like:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Base URL: Each client has its own SIT\/UAT environments with different URLs<\/li><li>Default username and password for test environments.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Creating the different config files<\/h3>\n\n\n\n<p>We can create a root level folder named &#8220;Config&#8221;. Under here we can create as many files as we need to cover, for example I have <code>config.ClientA.json<\/code> which contains:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"baseUrl\": \"http:\/\/clientA.internalserver.co.uk\/\",\n  \"env\": {\n    \"someVariable\": \"Foo\"\n  }\n}\n<\/code><\/pre>\n\n\n\n<p> And <code>config.ClientB.json<\/code> which contains: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"baseUrl\": \"http:\/\/clientB.internalserver.co.uk\/\",\n  \"env\": {\n    \"someVariable\": \"Bar\"\n  }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Editing the plugin file<\/h2>\n\n\n\n<p>First we need to import &#8220;path&#8221; and &#8220;fs-extra&#8221; packages by adding the following at the top of the <code>index.js<\/code> file within the <code>\/Plugins<\/code> folder (if it doesn&#8217;t already exist!). These will allow the file to be located and subsequently read.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const path = require(\"path\");\nconst fs = require(\"fs-extra\");<\/code><\/pre>\n\n\n\n<p>Next we need the method which will take in a client name\/environmental variable, locate the appropriate config file (being  \/config\/config.<strong>name<\/strong>.json), and then reading that file back to the calling method.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function getConfigurationFileByEnvName(env) {\n  const fileLocation = path.resolve(\"cypress\/config\", `config.${env}.json`);\n  return fs.readJson(fileLocation);\n}<\/code><\/pre>\n\n\n\n<p>and finally we need the index.js file to export this file. This will also have a fallback in place if one is not defined.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>module.exports = (on, config) => {  \n  const envFile = config.env.configFile || \"local\";\n  return getConfigurationFileByEnvName(envFile);\n};<\/code><\/pre>\n\n\n\n<p>The eagle eyed may realise that I am using <code>config.env.configFile<\/code> here which will mean passing an environmental flag in the command line rather than making direct use of the <code>--config<\/code> flag. This is personal preference, as I aim to expand on the <code>env<\/code> flags later so this will look cleaner.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Consuming the configuration<\/h3>\n\n\n\n<p>Now, when running the usual open command, we can make use of the <code>--env<\/code> flag to pass it the environmental variable. We do so with:<\/p>\n\n\n\n<p><code>.\/node_modules\/.bin\/cypress open --env configFile=<strong>clientA<\/strong><\/code><\/p>\n\n\n\n<p>It should now launch the test runner with your different files environmental variables available via <code>Cypress.env('key')<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, Cypress will support a single configuration based on the optional file cypress.json as described in their documentation here. Whilst this works fine for most, it would be great if we could have access to a cypress.dev.json for local development, or even better, a whole host of configuration files for use against a multi-tenant &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[11],"tags":[32,12,3],"class_list":["post-411","post","type-post","status-publish","format-standard","hentry","category-testing","tag-cypress","tag-javascript","tag-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Supporting multiple configurations in Cypress - yer.ac | Adventures of a developer, and other things.<\/title>\n<meta name=\"description\" content=\"Supportng multiple environment &amp; configurations with Cypress.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Supporting multiple configurations in Cypress - yer.ac | Adventures of a developer, and other things.\" \/>\n<meta property=\"og:description\" content=\"Supportng multiple environment &amp; configurations with Cypress.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/\" \/>\n<meta property=\"og:site_name\" content=\"yer.ac | Adventures of a developer, and other things.\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-07T16:13:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-07T16:13:17+00:00\" \/>\n<meta name=\"author\" content=\"yer.ac\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"yer.ac\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/02\\\/07\\\/supporting-multiple-configurations-in-cypress\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/02\\\/07\\\/supporting-multiple-configurations-in-cypress\\\/\"},\"author\":{\"name\":\"yer.ac\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"headline\":\"Supporting multiple configurations in Cypress\",\"datePublished\":\"2020-02-07T16:13:12+00:00\",\"dateModified\":\"2020-02-07T16:13:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/02\\\/07\\\/supporting-multiple-configurations-in-cypress\\\/\"},\"wordCount\":359,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"keywords\":[\"Cypress\",\"Javascript\",\"Testing\"],\"articleSection\":[\"Testing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/02\\\/07\\\/supporting-multiple-configurations-in-cypress\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/02\\\/07\\\/supporting-multiple-configurations-in-cypress\\\/\",\"url\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/02\\\/07\\\/supporting-multiple-configurations-in-cypress\\\/\",\"name\":\"Supporting multiple configurations in Cypress - yer.ac | Adventures of a developer, and other things.\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#website\"},\"datePublished\":\"2020-02-07T16:13:12+00:00\",\"dateModified\":\"2020-02-07T16:13:17+00:00\",\"description\":\"Supportng multiple environment & configurations with Cypress.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/02\\\/07\\\/supporting-multiple-configurations-in-cypress\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/02\\\/07\\\/supporting-multiple-configurations-in-cypress\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/02\\\/07\\\/supporting-multiple-configurations-in-cypress\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/yer.ac\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Supporting multiple configurations in Cypress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/yer.ac\\\/blog\\\/\",\"name\":\"yer.ac | Adventures of a developer, and other things.\",\"description\":\"Blog to keep track of things I am upto\",\"publisher\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/yer.ac\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\",\"name\":\"yer.ac\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"caption\":\"yer.ac\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Supporting multiple configurations in Cypress - yer.ac | Adventures of a developer, and other things.","description":"Supportng multiple environment & configurations with Cypress.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/","og_locale":"en_US","og_type":"article","og_title":"Supporting multiple configurations in Cypress - yer.ac | Adventures of a developer, and other things.","og_description":"Supportng multiple environment & configurations with Cypress.","og_url":"https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/","og_site_name":"yer.ac | Adventures of a developer, and other things.","article_published_time":"2020-02-07T16:13:12+00:00","article_modified_time":"2020-02-07T16:13:17+00:00","author":"yer.ac","twitter_card":"summary_large_image","twitter_misc":{"Written by":"yer.ac","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/#article","isPartOf":{"@id":"https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/"},"author":{"name":"yer.ac","@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"headline":"Supporting multiple configurations in Cypress","datePublished":"2020-02-07T16:13:12+00:00","dateModified":"2020-02-07T16:13:17+00:00","mainEntityOfPage":{"@id":"https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/"},"wordCount":359,"commentCount":1,"publisher":{"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"keywords":["Cypress","Javascript","Testing"],"articleSection":["Testing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/","url":"https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/","name":"Supporting multiple configurations in Cypress - yer.ac | Adventures of a developer, and other things.","isPartOf":{"@id":"https:\/\/yer.ac\/blog\/#website"},"datePublished":"2020-02-07T16:13:12+00:00","dateModified":"2020-02-07T16:13:17+00:00","description":"Supportng multiple environment & configurations with Cypress.","breadcrumb":{"@id":"https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/yer.ac\/blog\/2020\/02\/07\/supporting-multiple-configurations-in-cypress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/yer.ac\/blog\/"},{"@type":"ListItem","position":2,"name":"Supporting multiple configurations in Cypress"}]},{"@type":"WebSite","@id":"https:\/\/yer.ac\/blog\/#website","url":"https:\/\/yer.ac\/blog\/","name":"yer.ac | Adventures of a developer, and other things.","description":"Blog to keep track of things I am upto","publisher":{"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/yer.ac\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d","name":"yer.ac","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","caption":"yer.ac"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paP5IW-6D","jetpack-related-posts":[{"id":362,"url":"https:\/\/yer.ac\/blog\/2020\/02\/07\/%e2%9a%a1lightning-fast-testing-of-web-applications-with-cypress\/","url_meta":{"origin":411,"position":0},"title":"\u26a1lightning-fast testing of web applications with Cypress","author":"yer.ac","date":"February 7, 2020","format":false,"excerpt":"Cypress (Cypress.io) is an automation framework for web app testing built and configured with Javascript. Automated front-end testing is definitely not new, but Cypress really is something different. It's silly fast, requires almost no setup, has quick-to-learn syntax and has a really nice, feature packed test runner. Why Cypress? I'll\u2026","rel":"","context":"In &quot;Testing&quot;","block_context":{"text":"Testing","link":"https:\/\/yer.ac\/blog\/category\/testing\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/02\/image-6.png?fit=1089%2C402&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/02\/image-6.png?fit=1089%2C402&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/02\/image-6.png?fit=1089%2C402&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/02\/image-6.png?fit=1089%2C402&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/02\/image-6.png?fit=1089%2C402&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":351,"url":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/","url_meta":{"origin":411,"position":1},"title":"Using Docker Containers for easy local WordPress development\ud83d\udc33","author":"yer.ac","date":"January 6, 2020","format":false,"excerpt":"Creating WordPress development environment using Docker containers.","rel":"","context":"In &quot;Development&quot;","block_context":{"text":"Development","link":"https:\/\/yer.ac\/blog\/category\/development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?fit=648%2C465&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?fit=648%2C465&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?fit=648%2C465&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":78,"url":"https:\/\/yer.ac\/blog\/2019\/04\/09\/debugging-es6-mocha-unit-tests-using-vs-code\/","url_meta":{"origin":411,"position":2},"title":"Debugging ES6 Mocha unit tests using VS Code","author":"yer.ac","date":"April 9, 2019","format":false,"excerpt":"The world of Mocha, VS Code and Node is still fairly new to me. Typically in the past all my JS unit tests have been debuggable in-browser using DevTools, but with Mocha this is not the case (As I am not deploying my spec files). I got Mocha to load\u2026","rel":"","context":"In &quot;Development&quot;","block_context":{"text":"Development","link":"https:\/\/yer.ac\/blog\/category\/development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/04\/image-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/04\/image-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/04\/image-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/04\/image-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":599,"url":"https:\/\/yer.ac\/blog\/2026\/01\/23\/from-acceptance-criteria-to-playwright-tests-with-mcp\/","url_meta":{"origin":411,"position":3},"title":"From Acceptance Criteria to Playwright Tests with MCP","author":"yer.ac","date":"January 23, 2026","format":false,"excerpt":"Modern UI test tooling has quietly raised the bar for who can participate. Playwright is powerful, but it assumes comfort with TypeScript, selectors, repo structure, and terminal use. That gap often collapses testing back onto developers, creating pressure to almost validate their own work. This proof of concept explores using\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/yer.ac\/blog\/category\/development\/ai\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2026\/01\/cover.png?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2026\/01\/cover.png?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2026\/01\/cover.png?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2026\/01\/cover.png?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2026\/01\/cover.png?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":489,"url":"https:\/\/yer.ac\/blog\/2021\/04\/22\/using-podgrab-docker-to-backup-my-favorite-podcasts-in-this-case-on-a-qnap-nas\/","url_meta":{"origin":411,"position":4},"title":"Using PodGrab &#038; Docker to backup my favorite podcasts (In this case on a QNAP NAS)","author":"yer.ac","date":"April 22, 2021","format":false,"excerpt":"Whilst it's not a certainty that data will removed from the web, it does happen (See \/r\/datahoarder and \/r\/lostmedia). As I get all my podcasts through Spotify these days I have no control if they suddenly pull their account, or stop the show. There are also other use cases, like\u2026","rel":"","context":"In &quot;Home Networking&quot;","block_context":{"text":"Home Networking","link":"https:\/\/yer.ac\/blog\/category\/home-networking-2\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/04\/image.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/04\/image.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/04\/image.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/04\/image.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":508,"url":"https:\/\/yer.ac\/blog\/2021\/06\/29\/consuming-a-json-file-for-automatic-params-in-powershell\/","url_meta":{"origin":411,"position":5},"title":"Consuming a JSON file for automatic params in PowerShell","author":"yer.ac","date":"June 29, 2021","format":false,"excerpt":"More of a note for future me.... Typically in PowerShell when there is a requirement for reading an external file to set parameters, I would read in a file using the Get-Content and converting it to JSON, perhaps something like $json = Get-Content 'C:\\file.json' | Out-String | ConvertFrom-Json # To\u2026","rel":"","context":"In &quot;DevOps&quot;","block_context":{"text":"DevOps","link":"https:\/\/yer.ac\/blog\/category\/devops\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/comments?post=411"}],"version-history":[{"count":4,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/411\/revisions"}],"predecessor-version":[{"id":415,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/411\/revisions\/415"}],"wp:attachment":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/media?parent=411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/categories?post=411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/tags?post=411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}