<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Norbert Fuhs</title>
    <description>The latest articles on DEV Community by Norbert Fuhs (@nfuhs).</description>
    <link>https://dev.to/nfuhs</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F205683%2F58edc2dc-a071-4f05-9bdc-2132d9cda5a3.jpg</url>
      <title>DEV Community: Norbert Fuhs</title>
      <link>https://dev.to/nfuhs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nfuhs"/>
    <language>en</language>
    <item>
      <title>What is Go 2024 Edition</title>
      <dc:creator>Norbert Fuhs</dc:creator>
      <pubDate>Thu, 29 Feb 2024 15:26:41 +0000</pubDate>
      <link>https://dev.to/nfuhs/what-is-go-2024-edition-3b6h</link>
      <guid>https://dev.to/nfuhs/what-is-go-2024-edition-3b6h</guid>
      <description>&lt;p&gt;Its 2024 and Go also known as Golang gets 15 years old many opensource projects like Kubernetes are built using Go and now its a perfect time to start learning the language. In this blogpost I will provide you some resources learning Go to start your coding journey with it.&lt;/p&gt;

&lt;p&gt;What is Go and what is it used for?&lt;/p&gt;

&lt;p&gt;Go was created in 2007 by Robert Griesemer, Rob Pike and Ken Thompson at Google and was announced in November 2009.&lt;/p&gt;

&lt;p&gt;Go is also known as C for the 21st century and it shares similarities with C programming language. Its pretty easy today to get started with Go and here are some resources so you can start learning it.&lt;/p&gt;

&lt;p&gt;Tour of Go&lt;br&gt;
&lt;a href="https://go.dev/tour/welcome/1"&gt;https://go.dev/tour/welcome/1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Tour of Go lets you start learning Go with simple little exercises learning Go.&lt;/p&gt;

&lt;p&gt;Go by Example&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gobyexample.com/"&gt;https://gobyexample.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go by Example as the name implies shows you Go with coding example anyone can follow.&lt;/p&gt;

&lt;p&gt;Getting help learning Go&lt;/p&gt;

&lt;p&gt;The Go forum is a great place to ask questions about Go.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://forum.golangbridge.org/"&gt;https://forum.golangbridge.org/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What about books?&lt;/p&gt;

&lt;p&gt;Go In Action is a great book about Go written by William Kennedy , Brain Ketelsen and Erik St. Martin.&lt;br&gt;
You can order it by Manning Publications following the link below.&lt;br&gt;
 &lt;a href="https://www.manning.com/books/go-in-action"&gt;https://www.manning.com/books/go-in-action&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So you now have some resources learning Go if you#re in interested in more blogpost like this comment below and don't forget to follow me on Twitter: &lt;a href="https://twitter.com/NorbertFuhs"&gt;https://twitter.com/NorbertFuhs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading have a nice day!&lt;/p&gt;

</description>
      <category>go</category>
      <category>google</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to start learning Rust in 2024</title>
      <dc:creator>Norbert Fuhs</dc:creator>
      <pubDate>Sat, 16 Dec 2023 14:36:58 +0000</pubDate>
      <link>https://dev.to/nfuhs/how-to-start-learning-rust-in-2024-114</link>
      <guid>https://dev.to/nfuhs/how-to-start-learning-rust-in-2024-114</guid>
      <description>&lt;p&gt;Rust is a hot programming language these days and it is easy to get starting with it. A lot of cool software is written using Rust like Deno fror example. This short blogpost will help you getting started learning Rust.&lt;/p&gt;

&lt;p&gt;The Book&lt;/p&gt;

&lt;p&gt;The first contact point beside the official Rust hompage &lt;a href="https://www.rust-lang.org/"&gt;https://www.rust-lang.org/&lt;/a&gt; is the the Rustlang book: &lt;a href="https://doc.rust-lang.org/book/"&gt;https://doc.rust-lang.org/book/&lt;/a&gt; Here you can start writing small Rust programms and learn the basics of the Rust programming language.&lt;/p&gt;

&lt;p&gt;Rust by Example&lt;/p&gt;

&lt;p&gt;Rust by Example is another great resource learning to write basic Rust programms. &lt;a href="https://doc.rust-lang.org/rust-by-example/"&gt;https://doc.rust-lang.org/rust-by-example/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Youtube channel&lt;/p&gt;

&lt;p&gt;There is a Rust youtube channel showing you more advanced Rust concepts. &lt;a href="https://www.youtube.com/@RustVideos"&gt;https://www.youtube.com/@RustVideos&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rust in Action&lt;/p&gt;

&lt;p&gt;There is a papercopy book written by  Tim McNamara providing you with a guide about Rusts basic concepts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.manning.com/books/rust-in-action"&gt;https://www.manning.com/books/rust-in-action&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Conclusion&lt;/p&gt;

&lt;p&gt;You see there are enough free resources getting started learning Rust I hope you enjouyed this short blogpost.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Netlify Composable Web Platform</title>
      <dc:creator>Norbert Fuhs</dc:creator>
      <pubDate>Fri, 27 Oct 2023 19:52:00 +0000</pubDate>
      <link>https://dev.to/nfuhs/netlify-composable-web-platform-23mj</link>
      <guid>https://dev.to/nfuhs/netlify-composable-web-platform-23mj</guid>
      <description>&lt;p&gt;Netlify introduces the Composable Web Platform a new way to to run web architecture.&lt;/p&gt;

&lt;p&gt;The Composable Web Platform is built using three parts:&lt;/p&gt;

&lt;p&gt;Netlify Connect&lt;/p&gt;

&lt;p&gt;Connects all content resources together.&lt;/p&gt;

&lt;p&gt;Netlify Core&lt;/p&gt;

&lt;p&gt;A frontend cloud solution that accelerates website deployment and speed.&lt;/p&gt;

&lt;p&gt;Netlify Create&lt;/p&gt;

&lt;p&gt;A visual editor to help to create content faster and easier.&lt;/p&gt;

&lt;p&gt;Composable Web Platform is vendor and framework agnostic helping you building a better web expierence.&lt;/p&gt;

&lt;p&gt;You can learn more about Composable Web Platform in this blogpost on the Netlify site:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.netlify.com/blog/introducing-the-netlify-composable-web-platform/?utm_content=eyebrow"&gt;https://www.netlify.com/blog/introducing-the-netlify-composable-web-platform/?utm_content=eyebrow&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope you enjoyed this blogpost if you would like more content like this feel free to comment below and don't forget to follow me on Twitter: &lt;a href="https://twitter.com/NorbertFuhs"&gt;https://twitter.com/NorbertFuhs&lt;/a&gt;&lt;/p&gt;

</description>
      <category>netlify</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What is MinIO? Part 1</title>
      <dc:creator>Norbert Fuhs</dc:creator>
      <pubDate>Fri, 08 Sep 2023 17:26:42 +0000</pubDate>
      <link>https://dev.to/nfuhs/what-is-minio-part-1-51kl</link>
      <guid>https://dev.to/nfuhs/what-is-minio-part-1-51kl</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Object storage as a Service has got hot these days. Amazon S3 is the market leader right now and the S3 API is the defacto standard for sharing objects in the cloud. MinIO is fully API compatible with Amazon's S3 API and can be easily run in multiple cloud enviroments in this blogpost we will take a look at MinIO basic components.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key components of MinIO
&lt;/h2&gt;

&lt;h3&gt;
  
  
  MinIO Server
&lt;/h3&gt;

&lt;p&gt;MinIO Server. MinIO is a distributed object storage server. It boasts the most comprehensive implementation of the Amazon S3 API to be found anywhere outside of Amazon itself. &lt;/p&gt;

&lt;h3&gt;
  
  
  MinIO Client
&lt;/h3&gt;

&lt;p&gt;MinIO Client. Is a handy CLI tool managing objects on the MinIO Server this client provides great functionality managing Object Storage in cloud environments. Scripting abilities provide great functionality for DevOps teams.&lt;/p&gt;

&lt;h3&gt;
  
  
  MinIO Console
&lt;/h3&gt;

&lt;p&gt;MinIO Console. The MinIO Console is a browser-based GUI that incorporates all the functionality of the MinIO Client in a design that feels familiar to IT admins and developers alike. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;MinIO is a great way to store unstructered data as objects in th cloud. Powered by Kubernetes its is simple to use in modern cloud enviroments and is a easy and fast way to scale data as objects. With the rise of of AI based systems like Large language models and other ML based tools its a hot choice for cloud based solutions.&lt;/p&gt;

&lt;p&gt;Stay tuned for part 2 of the series whre we will dive deeper into managing object-storage data with the use aof MinIO and the programming language Go.&lt;/p&gt;

&lt;p&gt;Don't forget to follow me on X   &lt;a href="https://twitter.com/NorbertFuhs"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>minio</category>
      <category>opensource</category>
      <category>go</category>
      <category>git</category>
    </item>
    <item>
      <title>Setting up Minio as a database for Medusajs</title>
      <dc:creator>Norbert Fuhs</dc:creator>
      <pubDate>Fri, 16 Jun 2023 14:49:39 +0000</pubDate>
      <link>https://dev.to/nfuhs/setting-up-minio-as-a-database-for-medusajs-11gp</link>
      <guid>https://dev.to/nfuhs/setting-up-minio-as-a-database-for-medusajs-11gp</guid>
      <description>&lt;p&gt;In this blogpost you'll learn howto setup Minio as database for Medusa.&lt;/p&gt;

&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;MinIO is a High Performance Object Storage released under GNU Affero General Public License v3.0. It is API compatible with the Amazon S3 cloud storage service. It can handle unstructured data such as photos, videos, log files, backups, and container images with a current maximum supported object size of 5TB.&lt;/p&gt;

&lt;p&gt;As beeing compatible with Amazon S3 Minio is a hot choice as data-storage.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup Medusa
&lt;/h3&gt;

&lt;p&gt;First we gonna setup Medusajs. You can follow this &lt;a href="https://docs.medusajs.com/development/backend/install"&gt;Quickstart Guide&lt;/a&gt; to do so.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup Minio
&lt;/h3&gt;

&lt;p&gt;Minio provides many install options you can refer the &lt;a href="https://min.io/docs/minio/kubernetes/upstream/"&gt;Documentation Page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this case we decide to install Minio and Medusa on macOS.&lt;/p&gt;

&lt;p&gt;We're going to use &lt;a href="https://brew.sh/"&gt;Homebrew&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install minio/stable/minio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Starting the Minio Server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export MINIO_CONFIG_ENV_FILE=/etc/default/minio
minio server --console-address :9090
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Changing Minios port
&lt;/h3&gt;

&lt;p&gt;Minios and Medusajs backend both us the same port 9000 to avoid a collision we're going to change Minios port to 9001.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;minio server ~/minio --console-address :9090 --address :9001
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create a Minio bucket
&lt;/h3&gt;

&lt;p&gt;We're going to create a bucket storing the Medusajs backend files. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log into the Minio Console&lt;/li&gt;
&lt;li&gt;Click on the create bucket button&lt;/li&gt;
&lt;li&gt;Enter the name of the bucket in the Bucket Namefield&lt;/li&gt;
&lt;li&gt;Click on the create bucket button&lt;/li&gt;
&lt;li&gt;on the buckets page click on the cog icon on the the top to configure the bucket.&lt;/li&gt;
&lt;li&gt;Click on the edit icon next to Access Policy.&lt;/li&gt;
&lt;li&gt;Change the selected value to public and click Set.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Generate Access Keys
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Click on Access Keys from the Minio Console&lt;/li&gt;
&lt;li&gt;Click on the "Create access key" button&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tihs is will open up a form with generated keys click on Create button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A pop-up will show Access-Key and Secret-Key copy both as we will use them later.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Plugin installation
&lt;/h3&gt;

&lt;p&gt;In the folder of your Medusa backend run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install medusa-file-minio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then add the following environment variables in .env :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MINIO_ENDPOINT=&amp;lt;ENDPOINT&amp;gt;
MINIO_BUCKET=&amp;lt;BUCKET&amp;gt;
MINIO_ACCESS_KEY=&amp;lt;ACCESS_KEY&amp;gt;
MINIO_SECRET_KEY=&amp;lt;SECRET_KEY&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally configure medusa-config.js to include the plugin with required options:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;plugins&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`medusa-file-minio`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;endpoint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MINIO_ENDPOINT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;bucket&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MINIO_BUCKET&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;access_key_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MINIO_ACCESS_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;secret_access_key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MINIO_SECRET_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thats it I hope you enjoyed this blogpost about using Minio as database for a Medusajs backend.&lt;/p&gt;

&lt;p&gt;Feel free to follow me on &lt;a href="https://twitter.com/NorbertFuhs"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>medusa</category>
    </item>
    <item>
      <title>Whats Medusa an introduction part 3 Modules</title>
      <dc:creator>Norbert Fuhs</dc:creator>
      <pubDate>Mon, 29 May 2023 17:32:47 +0000</pubDate>
      <link>https://dev.to/nfuhs/whats-medusa-an-introduction-part-3-modules-45g2</link>
      <guid>https://dev.to/nfuhs/whats-medusa-an-introduction-part-3-modules-45g2</guid>
      <description>&lt;p&gt;In this blogpost I will introduce you to Modules and how you can use them.&lt;/p&gt;

&lt;p&gt;Modules are self-contained reusable pieces of code which add functionality to your ecommerce application.&lt;br&gt;
Modules increase Medusas extensibilty and can be seen as small units of independent code. Modules can run independently of Medusas core package.&lt;/p&gt;

&lt;p&gt;Modules are created and loaded similarly to plugins. They can be loaded from a local project or can be installed from an NPM package. &lt;/p&gt;
&lt;h3&gt;
  
  
  Create a module
&lt;/h3&gt;

&lt;p&gt;Create a directory with the following structure in it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;custom-module
|
|--index.ts
|
|--services // directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The directory can be an NPM project but that's optional. index.ts is the entry point to our module. The services directory holds extra services. The following TypeScript configuration file tsconfig.json should be added in the root of the project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;compilerOptions&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;lib&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;es2020&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;target&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2020&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;outDir&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./dist&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;esModuleInterop&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;declaration&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;module&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;commonjs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;moduleResolution&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;node&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;emitDecoratorMetadata&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;experimentalDecorators&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sourceMap&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;noImplicitReturns&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;strictNullChecks&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;strictFunctionTypes&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;noImplicitThis&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;allowJs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;skipLibCheck&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;include&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;src&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;exclude&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dist&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./src/**/__tests__&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./src/**/__mocks__&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./src/**/__fixtures__&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;node_modules&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Implementing the module
&lt;/h3&gt;

&lt;p&gt;When developing the module you'll later reference the module using a file path to a index.js or index.ts file.&lt;br&gt;
This file acts as an entry point to our module.&lt;/p&gt;
&lt;h3&gt;
  
  
  Export the module
&lt;/h3&gt;

&lt;p&gt;To use the module withe the medusa backend we need to export it. This is done in the file index.ts the file must export an object with the following properties:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;ModuleExports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Constructor&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;any&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nx"&gt;loaders&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;ModuleLoaderFunction&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;
  &lt;span class="nx"&gt;migrations&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;any&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;
  &lt;span class="nx"&gt;models&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;Constructor&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;any&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;
  &lt;span class="nx"&gt;runMigrations&lt;/span&gt;&lt;span class="p"&gt;?(&lt;/span&gt;
    &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;LoaderOptions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;moduleDeclaration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;InternalModuleDeclaration&lt;/span&gt;
  &lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nx"&gt;revertMigration&lt;/span&gt;&lt;span class="p"&gt;?(&lt;/span&gt;
    &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;LoaderOptions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;moduleDeclaration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;InternalModuleDeclaration&lt;/span&gt;
  &lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Reference module
&lt;/h3&gt;

&lt;p&gt;To use the module in the Medusa backend add your module to medusa-config.js:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
  &lt;span class="na"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="na"&gt;moduleType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;module-name-or-path&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="na"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// options if necessary&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="c1"&gt;// optional&lt;/span&gt;
      &lt;span class="na"&gt;resources&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;shared&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Module reference
&lt;/h3&gt;

&lt;p&gt;If a module is installed as NPM package the value of the resolve property should be the name of the package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
  &lt;span class="na"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="na"&gt;moduleType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;custom-module&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Whe using a local module you must reference the module from using an relative file path to ot from the Medusa backend.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;|
|---custom module
|   |
|   |---index.ts
|   |
|   |---services
|   |    |
|   |    |---custom-service.ts
|
|
|
---medusa-backend
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can reference your module in two ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Referencing the directory 
the index.ts file is in the root of the directory&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;medusa-config.js:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
  &lt;span class="na"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="na"&gt;moduleType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../custom-module&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Referencing the index file
medusa-config.js
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
  &lt;span class="na"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="na"&gt;moduleType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../custom-module/index.ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Test your module
&lt;/h3&gt;

&lt;p&gt;Test your module running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx @medusajs/medusa-cli develop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Howto publish a module
&lt;/h3&gt;

&lt;p&gt;You'll need an NPM account to publish a module.&lt;/p&gt;

&lt;p&gt;Create an NPM project&lt;/p&gt;

&lt;p&gt;Run the folllowing commands to create a directory and init an NPM project in it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir my-module
yarn init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A package.json file will be created inside the directory.&lt;/p&gt;

&lt;h3&gt;
  
  
  Changes to package.json
&lt;/h3&gt;

&lt;p&gt;In your package.json file add the following fields:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// other fields&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;main&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dist/index.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;publishConfig&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;access&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;public&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;files&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dist&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;devDependencies&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@medusajs/types&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;^0.0.2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cross-env&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;^5.2.1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;typescript&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;^4.4.4&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;scripts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;watch&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tsc --build --watch&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;prepare&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cross-env NODE_ENV=production npm run build&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;build&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tsc --build&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dependencies&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@medusajs/modules-sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;^0.1.0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Configure tsconfig.json
&lt;/h3&gt;

&lt;p&gt;Create a tsconfig.json file in the root of your NPM project:&lt;/p&gt;

&lt;p&gt;tsconfig.json&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "compilerOptions": {
    "lib": [
      "es2020"
    ],
    "target": "2020",
    "outDir": "./dist",
    "esModuleInterop": true,
    "declaration": true,
    "module": "commonjs",
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "sourceMap": true,
    "noImplicitReturns": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "noImplicitThis": true,
    "allowJs": true,
    "skipLibCheck": true,
  },
  "include": ["src"],
  "exclude": [
    "dist",
    "./src/**/__tests__",
    "./src/**/__mocks__",
    "./src/**/__fixtures__",
    "node_modules"
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Publish and use module
&lt;/h2&gt;

&lt;p&gt;Run prepare command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn prepare
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Login into your npm account:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Publish module package&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm publish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thats all for now on modules in Medusa.js I hope you enjoyed this blogpost.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>medusa</category>
    </item>
    <item>
      <title>Whats Medusa an introduction part 2 Next.js storefront</title>
      <dc:creator>Norbert Fuhs</dc:creator>
      <pubDate>Sun, 26 Feb 2023 17:43:25 +0000</pubDate>
      <link>https://dev.to/nfuhs/whats-medusa-an-introduction-part-2-nextjs-storefront-4543</link>
      <guid>https://dev.to/nfuhs/whats-medusa-an-introduction-part-2-nextjs-storefront-4543</guid>
      <description>&lt;p&gt;As we know from part 1 of this series &lt;a href="https://dev.to/nfuhs/whats-medusa-an-introduction-part-1-3753"&gt;Part 1&lt;/a&gt; Medusajs itself is based on 3 components:&lt;/p&gt;

&lt;p&gt;Medusa Server&lt;br&gt;
Admin Dashboard&lt;br&gt;
Storefront&lt;/p&gt;

&lt;p&gt;Now we will take a look at howto install and deploy a Storefront based on &lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;Next.js&lt;/a&gt;. We will start by creating a new Next.js project using the Medusa starter template.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-next-app -e https://github.com/medusajs/nextjs-starter-medusa my-medusa-storefront

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next we change in to the newly created directory my-medusa-storefront and rename the template environment file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd my-medusa-storefront
mv .env.template .env.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure the Medusa Server is running after that it's time to start the Next.js server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your new Next.js based storefront is running on &lt;code&gt;https://localhost:8000&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Thats it for this part of the series in the next part we will take a look at customisation of the storefront and learn more about using APIs.&lt;/p&gt;

&lt;p&gt;Stay tuned and don't forget to follow me on &lt;a href="https://twitter.com/NorbertFuhs" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>Whats Medusa an introduction part 1</title>
      <dc:creator>Norbert Fuhs</dc:creator>
      <pubDate>Thu, 26 Jan 2023 12:32:41 +0000</pubDate>
      <link>https://dev.to/nfuhs/whats-medusa-an-introduction-part-1-3753</link>
      <guid>https://dev.to/nfuhs/whats-medusa-an-introduction-part-1-3753</guid>
      <description>&lt;p&gt;In this short blogpost you'll learn about &lt;a href="https://medusajs.com/" rel="noopener noreferrer"&gt;Medusajs&lt;/a&gt; the opensource Shopify alternative.&lt;/p&gt;

&lt;p&gt;Medusa is based on &lt;a href="https://nodejs.org/en/" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt; and the web framework &lt;a href="https://expressjs.com/" rel="noopener noreferrer"&gt;Express&lt;/a&gt; medusajs is hosted on &lt;a href="https://github.com/medusajs/medusa" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and written in &lt;a href="https://www.typescriptlang.org/" rel="noopener noreferrer"&gt;TypeScript&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Medusa itself is based on three components:&lt;/p&gt;

&lt;p&gt;Medusa Server&lt;br&gt;
Admin dashboard&lt;br&gt;
Storefront&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr7mq734lqpar3o8ussf1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr7mq734lqpar3o8ussf1.png" alt="Image description" width="800" height="315"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Howto install Medusa?
&lt;/h3&gt;

&lt;p&gt;Medusa provide a quickstart method to install a Medusa server which assumed you have Node.js and Git installed on your system.&lt;/p&gt;

&lt;p&gt;First we install the Medusa-CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install @medusajs/medusa-cli -g
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a new Medusa project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;medusa new my-medusa-store --seed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start you Medusa server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd my-medusa-store
medusa develop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's all we need todo to run our Medusa server locally.&lt;br&gt;
Medusa provides different storefronts which are based on &lt;a href="https://www.gatsbyjs.com/" rel="noopener noreferrer"&gt;Gatsby&lt;/a&gt; or &lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;Next.js&lt;/a&gt; we'll cover in later parts howto setup a storefrontend.&lt;/p&gt;

&lt;p&gt;Thats all for now if you liked the blogpost you can comment below or follow me on &lt;a href="https://twitter.com/NorbertFuhs" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Stay tuned for part 2.&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>What is Deno Part 1</title>
      <dc:creator>Norbert Fuhs</dc:creator>
      <pubDate>Tue, 24 Jan 2023 16:34:19 +0000</pubDate>
      <link>https://dev.to/nfuhs/what-is-deno-part-1-dgo</link>
      <guid>https://dev.to/nfuhs/what-is-deno-part-1-dgo</guid>
      <description>&lt;p&gt;In this short blogpost we will take a look at Deno and write some small apps with it. &lt;/p&gt;

&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Deno is a runtime for JavaScript , TypeScript which is based on V8 and Rust. It was co-created by Ryan Dahl who also created Node.js. Deno was announced at the JS Conf EU in 2018. In 2022 Deno got a lot of attention recently because since Deno 1.28 it introduced &lt;a href="https://deno.com/blog/v1.28"&gt;npm-support&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Denos advantages over Node.js are TypeScript support out of the box and full compatibility with Web-APIs you can use just like in a normal browser.&lt;/p&gt;

&lt;p&gt;To install Deno follow the instructions on the &lt;a href="https://deno.land/manual@v1.29.4/getting_started/installation"&gt;Deno Website&lt;/a&gt; once you done this you can write your first Deno program:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello Deno!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you just need to run the deno run command in your terminal to run it:&lt;br&gt;
&lt;code&gt;deno run 01-hello-world.ts&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Congratulations you wrote your first Deno programm.&lt;/p&gt;
&lt;h3&gt;
  
  
  basic webserver
&lt;/h3&gt;

&lt;p&gt;Now we will write a basic webserver using Deno's standard library:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;serve&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://deno.land/std@0.171.0/http/server.ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8080&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;Response&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`Your user-agent is:\n\n&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;
    &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user-agent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Unknown&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`HTTP webserver running. Access it at: http://localhost:8080/`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;serve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note the import statement here we're importing a Deno module just with a weblink using ES modules rather than using Common JS as in Node.js.&lt;/p&gt;

&lt;p&gt;You can try the webserver by running &lt;code&gt;deno run --allow-net HTTP-Server.ts&lt;/code&gt; note the --allow-net statement here, Deno code runs in a safe sandbox by default so you have to grant permissions for example get net access in your app.&lt;/p&gt;

&lt;p&gt;You can now run &lt;code&gt;http://localhost:8080/&lt;/code&gt; and get your displayed which web browser you use.&lt;/p&gt;

&lt;h3&gt;
  
  
  npm support
&lt;/h3&gt;

&lt;p&gt;Deno support Node.js npm modles which is handy since there not much Deno native modules this days the following example will import the Express framework:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;npm:express@^4.17&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;listening on http://localhost:3000/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the end of the first part a introduction to Deno comment below if you liked it or not based on the comments I will blog a second part soon stay tuned.&lt;/p&gt;

</description>
      <category>deno</category>
      <category>webdev</category>
      <category>typescript</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
