{"id":18161,"date":"2024-04-11T05:58:02","date_gmt":"2024-04-11T12:58:02","guid":{"rendered":"https:\/\/ioflood.com\/blog\/?p=18161"},"modified":"2024-04-11T05:58:11","modified_gmt":"2024-04-11T12:58:11","slug":"npm-serve","status":"publish","type":"post","link":"https:\/\/ioflood.com\/blog\/npm-serve\/","title":{"rendered":"NPM Serve | Usage Guide for Local Development"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"alignright size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/ioflood.com\/blog\/wp-content\/uploads\/2024\/03\/Terminal-screen-Graphic-of-npm-serve-command-300x300.jpg\" alt=\"Terminal screen Graphic of npm serve command\" width=\"300\" height=\"300\" title=\"\"><\/figure>\n<\/div>\n<p>As a baremetal server host, we quicky learned that testing application on live servers is not ideal. However, needing to start-up development servers can be a time consuming process. To remedy this we have learned how to utilize <code>npm serve<\/code> scripts to quickly start a local development server that can run our pre-defined web applications. To help others with this, we&#8217;ve put together this guide on npm serve. By following the provided instructions, you&#8217;ll also be able to start development servers and test your applications easily.<\/p>\n<p><strong>This guide will walk you through using &#8216;npm serve&#8217;, a crucial tool for web developers aiming to test their projects locally.<\/strong> Whether you&#8217;re working on a small personal project or a large-scale web application, understanding how to use &#8216;npm serve&#8217; effectively can significantly enhance your development workflow.<\/p>\n<p>Ready to simplify your development workflow?Let&#8217;s dive into the world of Node.js development with <code>npm serve<\/code>!<\/p>\n<h2>TL;DR: What Does &#8216;npm serve&#8217; Do?<\/h2>\n<blockquote><p>\n  <code>npm serve<\/code> launches a local server to serve static files and test web projects. To use it, first install the serve package globally using <code>npm install -g serve<\/code>. Then, navigate to your project directory and execute <code>serve -s build<\/code> to start the server, where &#8216;build&#8217; is the directory containing your static files. Upon success, the server will be accessible via the localhost.\n<\/p><\/blockquote>\n<p>Here&#8217;s a quick example:<\/p>\n<pre><code class=\"language-bash line-numbers\">npm install -g serve\nserve -s build\n\n# Output:\n# Serving! Your site is available at http:\/\/localhost:5000\n<\/code><\/pre>\n<p>In this example, we first install &#8216;serve&#8217; globally using npm, ensuring it can be run from anywhere on your system. Then, by running <code>serve -s build<\/code>, we&#8217;re telling &#8216;serve&#8217; to statically serve the contents of the &#8216;build&#8217; directory. This is particularly useful for testing production builds of your web projects locally.<\/p>\n<blockquote><p>\n  Excited to dive deeper into &#8216;npm serve&#8217; and unlock its full potential? Keep reading for more detailed instructions, advanced configurations, and troubleshooting tips.\n<\/p><\/blockquote>\n<h2>Getting Started with npm serve<\/h2>\n<p>Diving into the world of web development can be thrilling, yet daunting, especially when it comes to testing your projects in a real-world scenario. That&#8217;s where <code>npm serve<\/code> comes into play, acting as a bridge between your development environment and the final product. Let&#8217;s break down the basics of using <code>npm serve<\/code> to serve a static site for the very first time.<\/p>\n<p>First, ensure you have Node.js installed on your computer. This provides you with npm (Node Package Manager), which is essential for running <code>npm serve<\/code>. If you&#8217;re unsure, you can check by running <code>node -v<\/code> in your terminal to see if you get a version number back.<\/p>\n<p>Now, let&#8217;s get <code>serve<\/code> installed and run our first local server:<\/p>\n<pre><code class=\"language-bash line-numbers\">npm install -g serve\nserve\n\n# Output:\n# INFO: Accepting connections at http:\/\/localhost:3000\n<\/code><\/pre>\n<p>In this example, we&#8217;ve installed <code>serve<\/code> globally using <code>npm install -g serve<\/code>, which allows us to use the <code>serve<\/code> command from anywhere on our system. After installation, simply typing <code>serve<\/code> in the terminal starts a local server. The output tells us that our site is now being served locally at <code>http:\/\/localhost:3000<\/code>.<\/p>\n<p>Navigating to <code>http:\/\/localhost:3000<\/code> in your web browser, you&#8217;ll be greeted with a listing of the files and directories in your current working directory. This is because we didn&#8217;t specify a directory to serve, so <code>serve<\/code> defaults to the current directory. It&#8217;s a straightforward way to quickly view and test your project in a browser environment.<\/p>\n<p>Understanding this output is crucial. The URL provided (http:\/\/localhost:3000) is where your served site is accessible from any web browser on your local machine. It&#8217;s the gateway to viewing your web project as if it were live on the internet, but it&#8217;s only visible to you, making it a safe playground for testing and development.<\/p>\n<p>Embracing <code>npm serve<\/code> as part of your development toolkit can significantly streamline the process of testing and tweaking your web projects. It simplifies the step from coding to viewing your work in a live environment, bridging the gap between development and production in a user-friendly manner.<\/p>\n<h2>Advanced Features of npm serve<\/h2>\n<p>Once you&#8217;ve mastered the basics of <code>npm serve<\/code>, it&#8217;s time to unlock its full potential by exploring some advanced features. These capabilities can significantly enhance your development workflow, especially when working on more complex projects like single-page applications (SPAs) or when you need to simulate a more production-like environment with HTTPS.<\/p>\n<h3>Customizing Ports for Your Projects<\/h3>\n<p>Sometimes, the default port (5000) might be in use, or you may want to run multiple projects simultaneously. Customizing the port is straightforward:<\/p>\n<pre><code class=\"language-bash line-numbers\">serve -l 4000\n\n# Output:\n# INFO: Accepting connections at http:\/\/localhost:4000\n<\/code><\/pre>\n<p>By using the <code>-l<\/code> option followed by a port number, you can tell <code>serve<\/code> to listen on a specific port. In this case, we&#8217;re serving our project on port 4000. This flexibility allows you to manage multiple projects without port conflicts.<\/p>\n<h3>Enabling HTTPS for Secure Local Testing<\/h3>\n<p>Testing your project with HTTPS locally can help you catch issues that would only surface in a production environment. Here\u2019s how to enable HTTPS with <code>serve<\/code>:<\/p>\n<pre><code class=\"language-bash line-numbers\">serve -S\n\n# Output:\n# INFO: Accepting connections at https:\/\/localhost:5000\n<\/code><\/pre>\n<p>By simply adding the <code>-S<\/code> flag (uppercase), <code>serve<\/code> switches to serving your files over HTTPS. This feature is invaluable for testing functionalities that require a secure context, like service workers or HTTP\/2 features.<\/p>\n<h3>Serving Single-Page Applications (SPAs)<\/h3>\n<p>Single-page applications often rely on client-side routing, which can present challenges when refreshing pages or accessing URLs directly. <code>npm serve<\/code> provides a simple solution:<\/p>\n<pre><code class=\"language-bash line-numbers\">serve -s build\n\n# Output:\n# INFO: Accepting connections at http:\/\/localhost:5000\n# INFO: Serving Single-Page Application\n<\/code><\/pre>\n<p>The <code>-s<\/code> flag tells <code>serve<\/code> to redirect all navigation requests to the index.html file, allowing your SPA&#8217;s client-side router to handle the request. This mimics the behavior of most static hosting environments and ensures a smoother development experience.<\/p>\n<p>By leveraging these advanced features of <code>npm serve<\/code>, you can tailor the local development environment to better suit your project&#8217;s needs, from running multiple projects on different ports to ensuring your SPA works seamlessly. Understanding and utilizing these capabilities will not only improve your workflow but also prepare your projects for a smoother transition to production environments.<\/p>\n<h2>Exploring Alternatives to npm serve<\/h2>\n<p>While <code>npm serve<\/code> is a powerful tool for many developers, the ecosystem offers alternative packages that might better suit specific needs or preferences. Understanding these alternatives can empower you to choose the most effective tool for your project. Let&#8217;s delve into two popular npm packages: <code>http-server<\/code> and <code>live-server<\/code>, comparing their features and scenarios where they might be more advantageous than <code>npm serve<\/code>.<\/p>\n<h3>http-server: A Simple, Zero-Configuration Command-line HTTP Server<\/h3>\n<pre><code class=\"language-bash line-numbers\">npm install -g http-server\nhttp-server -p 8080\n\n# Output:\n# Starting up http-server, serving .\/\n# Available on:\n# http:\/\/127.0.0.1:8080\n# http:\/\/192.168.1.5:8080\n<\/code><\/pre>\n<p><code>http-server<\/code> is a straightforward, zero-configuration command-line HTTP server. One of its key advantages is its simplicity and ease of use. By running <code>http-server<\/code> in any directory, you instantly create a local server serving that directory&#8217;s contents. The <code>-p<\/code> option allows you to specify a port, similar to <code>serve<\/code>. This tool is particularly useful for quick testing without the need for advanced features like HTTPS or SPA support.<\/p>\n<h3>live-server: A Development HTTP Server with Live Reload Capability<\/h3>\n<pre><code class=\"language-bash line-numbers\">npm install -g live-server\nlive-server --port=3000\n\n# Output:\n# Serving \".\/\" at http:\/\/127.0.0.1:3000\n# Ready for changes\n<\/code><\/pre>\n<p><code>live-server<\/code> takes it a step further by integrating live reload functionality. This means that it automatically reloads your web page whenever you modify and save a file in the directory being served. The <code>--port<\/code> flag functions similarly to <code>serve<\/code> and <code>http-server<\/code>, allowing you to specify the port. <code>live-server<\/code> is an excellent choice for projects where you&#8217;re making frequent changes and want to see the results instantly without manually refreshing your browser.<\/p>\n<h3>Choosing the Right Tool<\/h3>\n<p>Both <code>http-server<\/code> and <code>live-server<\/code> offer unique advantages. <code>http-server<\/code> is ideal for simplicity and quick setup, while <code>live-server<\/code> enhances your workflow with live reloading. Your choice depends on your project&#8217;s specific needs:<\/p>\n<ul>\n<li>Use <code>http-server<\/code> for static sites where you need a simple, quick server.<\/li>\n<li>Opt for <code>live-server<\/code> when working on projects that benefit from immediate feedback, such as UI\/UX design iterations.<\/li>\n<\/ul>\n<p>While <code>npm serve<\/code> remains a robust choice for many, exploring these alternatives can provide tailored solutions that enhance your development process. Each tool has its place, and the best choice varies depending on the task at hand.<\/p>\n<h2>Overcoming npm serve Hurdles<\/h2>\n<p>Even with the most straightforward tools, developers can encounter hiccups. When it comes to <code>npm serve<\/code>, a few common issues can disrupt your workflow. Let&#8217;s navigate through these challenges, offering solutions and best practices to keep your development process smooth.<\/p>\n<h3>Resolving Port Conflicts<\/h3>\n<p>One of the frequent issues developers face with <code>npm serve<\/code> is port conflicts. This occurs when the default port (5000) or the one you&#8217;ve chosen is already in use. Here&#8217;s how to switch to an available port:<\/p>\n<pre><code class=\"language-bash line-numbers\">serve -l 3001\n\n# Output:\n# INFO: Accepting connections at http:\/\/localhost:3001\n<\/code><\/pre>\n<p>In this example, we use the <code>-l<\/code> option to specify a different port (3001). This command directs <code>serve<\/code> to listen on port 3001, circumventing the conflict. Always ensure the chosen port is free to avoid overlap with other running services.<\/p>\n<h3>Serving the Correct Directory<\/h3>\n<p>Another common pitfall is serving files from the incorrect directory, leading to confusion when the expected content doesn&#8217;t appear. To serve a specific directory, navigate to your project&#8217;s root directory or specify the path directly:<\/p>\n<pre><code class=\"language-bash line-numbers\">serve \/path\/to\/your\/project\n\n# Output:\n# INFO: Accepting connections at http:\/\/localhost:5000\n# INFO: Serving files from '\/path\/to\/your\/project'\n<\/code><\/pre>\n<p>This command serves the content of the specified directory, ensuring you&#8217;re testing the right version of your project. It&#8217;s crucial for accurately assessing your project&#8217;s current state.<\/p>\n<h3>Tackling Live Reloading Issues<\/h3>\n<p>Live reloading is a feature that automatically refreshes your project in the browser whenever files change, saving time and enhancing productivity. However, <code>npm serve<\/code> doesn&#8217;t support live reloading out of the box. If live reloading is essential for your workflow, consider using a tool like <code>live-server<\/code> or integrating a live reload plugin with your build process.<\/p>\n<pre><code class=\"language-bash line-numbers\">npm install -g live-server\nlive-server --port=3000\n\n# Output:\n# Serving \".\/\" at http:\/\/127.0.0.1:3000\n# Ready for changes\n<\/code><\/pre>\n<p>This example demonstrates installing and running <code>live-server<\/code>, which monitors file changes and refreshes the browser automatically. It&#8217;s an effective solution for projects requiring frequent updates.<\/p>\n<p>Navigating through these common issues with <code>npm serve<\/code> can significantly improve your development experience. By understanding how to resolve port conflicts, serve the correct directories, and facilitate live reloading, you&#8217;ll streamline your workflow and focus more on creativity and less on troubleshooting.<\/p>\n<h2>Understanding npm and npm serve<\/h2>\n<p>Before diving into the practical use of <code>npm serve<\/code>, it&#8217;s essential to grasp the fundamentals of npm (Node Package Manager) and its significance in the web development ecosystem. npm is more than just a tool; it&#8217;s the backbone of Node.js, enabling developers to share and consume packages, which are essentially reusable code modules.<\/p>\n<h3>npm: The Heart of Node.js<\/h3>\n<p>npm not only manages packages but also handles version control and dependencies for Node.js projects, making it an indispensable tool for developers. Here&#8217;s a simple demonstration of installing a package using npm:<\/p>\n<pre><code class=\"language-bash line-numbers\">npm install lodash\n\n# Output:\n# + lodash@4.17.21\n# added 1 package in 1.524s\n<\/code><\/pre>\n<p>In this example, we install <code>lodash<\/code>, a popular utility library. The output confirms the successful installation, showing the version installed and the time taken. This process illustrates npm&#8217;s role in managing project dependencies efficiently.<\/p>\n<h3>The Role of <code>npm serve<\/code><\/h3>\n<p><code>npm serve<\/code> comes into play as a command within the npm ecosystem that simplifies the task of serving your project locally. While npm itself does not directly offer the <code>serve<\/code> command, it facilitates installing the <code>serve<\/code> package, which provides the functionality. This distinction is crucial for understanding how <code>npm serve<\/code> fits into the broader npm and Node.js ecosystem.<\/p>\n<h3>Local Testing and Static Servers<\/h3>\n<p>Local testing is a critical phase in the development process, allowing developers to preview their work in a controlled environment before deployment. Static servers, like the one provided by <code>serve<\/code>, play a vital role in this stage. They serve your static files (HTML, CSS, JavaScript) to a browser, mimicking how they would be delivered in a live production environment. Here&#8217;s how you can serve a directory using <code>serve<\/code>:<\/p>\n<pre><code class=\"language-bash line-numbers\">npm install -g serve\nserve your_project_directory\n\n# Output:\n# INFO: Accepting connections at http:\/\/localhost:5000\n# INFO: Serving files from 'your_project_directory'\n<\/code><\/pre>\n<p>By specifying <code>your_project_directory<\/code>, you instruct <code>serve<\/code> to serve files from that location. The output indicates the server is running and ready to accept connections, showing the URL where your project is accessible. This step is fundamental for testing how your project behaves in a real-world scenario.<\/p>\n<p>Understanding the synergy between npm and <code>npm serve<\/code> is pivotal for modern web development. It underscores the importance of local testing and demonstrates how static servers facilitate a seamless transition from development to production. Armed with this knowledge, developers can leverage <code>npm serve<\/code> to enhance their development workflow, ensuring their projects are tested thoroughly before they go live.<\/p>\n<h2>Practical Usage of npm serve<\/h2>\n<p>As your projects grow in complexity and scale, integrating <code>npm serve<\/code> into a broader development workflow becomes crucial. This involves leveraging automated testing, continuous integration (CI), and deployment strategies to ensure a smooth and efficient development cycle. Let&#8217;s explore how <code>npm serve<\/code> fits into these advanced workflows and how it can enhance your development process.<\/p>\n<h3>Automating Testing with npm serve<\/h3>\n<p>Automated testing is a cornerstone of modern web development, ensuring your application behaves as expected before it reaches your users. Here&#8217;s how you can use <code>npm serve<\/code> in conjunction with testing frameworks to automate your testing process:<\/p>\n<pre><code class=\"language-bash line-numbers\">npm install -g serve\nserve -s build &amp; npm run test:e2e\n\n# Output:\n# INFO: Accepting connections at http:\/\/localhost:5000\n# Test Suite: e2e Tests Passed\n<\/code><\/pre>\n<p>In this example, we&#8217;re serving our build directory in the background (<code>&amp;<\/code>) and then running our end-to-end (e2e) test suite. This setup mimics a production environment for our tests, allowing us to catch issues that might only occur in a live setting. Automating this process as part of your CI pipeline can significantly enhance the reliability of your application.<\/p>\n<h3>Continuous Integration and Deployment<\/h3>\n<p>Continuous Integration (CI) and Continuous Deployment (CD) are practices that automate the integration of code changes and the deployment of your application. <code>npm serve<\/code> can play a role in this automation by serving your application in a CI environment for testing or by being part of a script that prepares your application for deployment. Here&#8217;s a conceptual example of a CI pipeline step using <code>npm serve<\/code>:<\/p>\n<pre><code class=\"language-bash line-numbers\"># CI Pipeline Step\nnpm install -g serve\nserve -s build --no-clipboard\n\n# Output:\n# INFO: Accepting connections at http:\/\/localhost:5000\n# INFO: Serving files from 'build' directory\n<\/code><\/pre>\n<p>In this scenario, <code>serve<\/code> is used to serve the build directory of your project within a CI pipeline, enabling automated tests or checks to run against a live server. The <code>--no-clipboard<\/code> option is used to prevent <code>serve<\/code> from attempting to copy the URL to the clipboard, which is useful in headless CI environments.<\/p>\n<h3>Further Resources for Expanding npm serve Knowledge<\/h3>\n<p>To deepen your understanding of <code>npm serve<\/code> and its integration into development workflows, here are three recommended resources:<\/p>\n<ul>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/docs.npmjs.com\/\" target=\"_blank\" rel=\"noopener\">Official NPM Documentation<\/a> &#8211; Provides comprehensive guides on npm commands, including &#8216;serve&#8217; for effective project management.<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/www.netlify.com\/\" target=\"_blank\" rel=\"noopener\">Netlify Platform<\/a> &#8211; An essential resource to learn how to deploy static websites and web applications with continuous Git deployment across Netlify&#8217;s global Content Delivery Network (CDN).<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/features\/actions\" target=\"_blank\" rel=\"noopener\">GitHub Actions for Node.js<\/a> &#8211; Explore how to streamline your Node.js workflow using GitHub Actions, which includes strategies for continuous integration and deployment.<\/p>\n<\/li>\n<\/ul>\n<p>By incorporating <code>npm serve<\/code> into your development and deployment workflows, you not only streamline the process but also ensure that your projects are robust and ready for production. The resources provided above offer valuable insights into further harnessing the power of <code>npm serve<\/code> and related technologies for modern web development.<\/p>\n<h2>Wrapping Up: Mastering &#8216;npm serve&#8217;<\/h2>\n<p>In this comprehensive guide, we&#8217;ve traversed the landscape of local development using <code>npm serve<\/code>, a pivotal tool for web developers aiming to test their projects in a local server environment. From the simplicity of getting a project off the ground to the nuances of configuring advanced settings, <code>npm serve<\/code> stands out as a versatile assistant in the web development toolkit.<\/p>\n<p>We began with the basics, introducing how to install and run <code>npm serve<\/code> for the first time, providing a solid foundation for beginners. We then navigated through the advanced features, such as customizing ports and enabling HTTPS, which are essential for tailoring the local server to fit the needs of more complex projects. Furthermore, we explored the realm of single-page applications (SPAs) and how <code>npm serve<\/code> adapts to serve them efficiently.<\/p>\n<p>In our journey, we also discussed alternative tools like <code>http-server<\/code> and <code>live-server<\/code>, offering insights into how different tools can be better suited for specific scenarios. This comparison sheds light on the diverse ecosystem available to developers, encouraging exploration and adaptation based on project requirements.<\/p>\n<table>\n<thead>\n<tr>\n<th>Tool<\/th>\n<th>Key Feature<\/th>\n<th>Ideal Use Case<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>npm serve<\/td>\n<td>SPA support<\/td>\n<td>Testing production builds locally<\/td>\n<\/tr>\n<tr>\n<td>http-server<\/td>\n<td>Zero-configuration<\/td>\n<td>Quick setup for static sites<\/td>\n<\/tr>\n<tr>\n<td>live-server<\/td>\n<td>Live reload functionality<\/td>\n<td>Projects with frequent updates<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>As we wrap up, it&#8217;s clear that understanding <code>npm serve<\/code> and its alternatives not only enhances your ability to test and develop web projects efficiently but also deepens your knowledge of the broader npm ecosystem. Whether you&#8217;re a beginner getting familiar with local development or an expert looking to streamline your workflow, <code>npm serve<\/code> offers valuable capabilities that can be tailored to a wide range of development scenarios.<\/p>\n<p>The ability to efficiently serve and test your projects locally is a crucial skill in the web developer&#8217;s arsenal. With the insights and examples provided in this guide, you&#8217;re now better equipped to leverage <code>npm serve<\/code> and its alternatives, ensuring your projects are thoroughly tested and ready for the world. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a baremetal server host, we quicky learned that testing application on live servers is not ideal. However, needing to start-up development servers can be a time consuming process. To remedy this we have learned how to utilize npm serve scripts to quickly start a local development server that can run our pre-defined web applications. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":18939,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[125,155,121],"tags":[],"class_list":["post-18161","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","category-node-js","category-programming-coding","cat-125-id","cat-155-id","cat-121-id","has_thumb"],"_links":{"self":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/18161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/comments?post=18161"}],"version-history":[{"count":9,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/18161\/revisions"}],"predecessor-version":[{"id":19031,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/18161\/revisions\/19031"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media\/18939"}],"wp:attachment":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media?parent=18161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/categories?post=18161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/tags?post=18161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}