<?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: Boris Siscanu</title>
    <description>The latest articles on DEV Community by Boris Siscanu (@bsiscanu).</description>
    <link>https://dev.to/bsiscanu</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%2F101926%2F1536e35f-52c8-42de-bb59-2bcb6effe442.jpeg</url>
      <title>DEV Community: Boris Siscanu</title>
      <link>https://dev.to/bsiscanu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bsiscanu"/>
    <language>en</language>
    <item>
      <title>Recycle your HTML code</title>
      <dc:creator>Boris Siscanu</dc:creator>
      <pubDate>Mon, 11 Feb 2019 21:37:36 +0000</pubDate>
      <link>https://dev.to/bsiscanu/recycle-your-html-code-1b7l</link>
      <guid>https://dev.to/bsiscanu/recycle-your-html-code-1b7l</guid>
      <description>&lt;p&gt;The basic mantra of software development "don't repeat yourself" was hardly achievable in the process of HTML layout creation, template engines smoothed the flow, but it kept to be an ocean of pain and divs for a long period of time.&lt;/p&gt;

&lt;p&gt;Gladly, everything changed with the introduction of web components, a set of web platform APIs used to produce encapsulated HTML tags. It reduces development span considerably, improves code quality and makes HTML code scalable ad infinitum. &lt;/p&gt;

&lt;p&gt;Apparently, it's a game changer and to persuade you to adopt web components as early as possible, we started the Domy project, a package manager for web components.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/teamdomy" rel="noopener noreferrer"&gt;
        teamdomy
      &lt;/a&gt; / &lt;a href="https://github.com/teamdomy/domy" rel="noopener noreferrer"&gt;
        domy
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Custom Elements Storage
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Custom Elements storage&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/teamdomy/domy/blob/master/LICENSE.md" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/66983804d9ebbae354e7de8ea1881fb16d413dc0524f91529369a1862576ea56/68747470733a2f2f696d672e736869656c64732e696f2f686578706d2f6c2f706c75672e737667" alt="License"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/b046f574a5c8962092e950480cd4cd5d0ce526b4ad38d2c494d0a3af83fde2d3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f7465616d646f6d792f646f6d792e737667"&gt;&lt;img src="https://camo.githubusercontent.com/b046f574a5c8962092e950480cd4cd5d0ce526b4ad38d2c494d0a3af83fde2d3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f7465616d646f6d792f646f6d792e737667" alt="Issues"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Utilization&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;Sign up by using your &lt;code&gt;username&lt;/code&gt;, &lt;code&gt;password&lt;/code&gt; and &lt;code&gt;email&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;domy signup&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Log in to the system from another computer or using another account:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;domy login&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Compile the project using Stencil and after publish it, submitting the whole directory:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;domy publish --version 0.1.0&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;em&gt;Execute the command in the root (base) directory of your project&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The version is optional. Non-versioned components will be sent to the &lt;strong&gt;master&lt;/strong&gt; branch&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It's possible to publish just one component by passing its &lt;strong&gt;class name&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;domy publish MyComponent --version 0.1.0&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Install the component in another project using its &lt;strong&gt;class name&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;domy install MyComponent --version 0.1.0&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;em&gt;Installed components will be tracked in package.json &lt;code&gt;webcomponents&lt;/code&gt; compartment&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To install all components listed in package.json &lt;code&gt;webcomponents&lt;/code&gt; compartment, drop the &lt;strong&gt;class name&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;domy install&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Components are installed in the &lt;strong&gt;node_modules/@&lt;/strong&gt; directory and could be reused in another &lt;strong&gt;Stencil&lt;/strong&gt; application:&lt;/p&gt;
&lt;div class="highlight highlight-source-js notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-c"&gt;// master is a non-versioned&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/teamdomy/domy" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;It detects and publishes every single web component used in a Stencil project, no configuration required.  The compiled code represents mostly an "intermediate" set of instructions generated by Stencil for distribution purpose. It means that on the last mile, Stencil compiler should be used to bundle everything together. In the registry, components are stored in deeply nested collections, where the root is the current user name&lt;/p&gt;

&lt;p&gt;Currently, only Stencil-like generated components are supported, the integration of LitElement base class is coming next.&lt;/p&gt;

&lt;p&gt;We would be thrilled to hear your opinion on the matter.  Submission of a feature or a bug would be even better. Thanks!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>ionic</category>
      <category>webcomponents</category>
    </item>
    <item>
      <title>The package manager for React components</title>
      <dc:creator>Boris Siscanu</dc:creator>
      <pubDate>Thu, 27 Dec 2018 11:33:27 +0000</pubDate>
      <link>https://dev.to/bsiscanu/the-package-manager-for-web-components-4b92</link>
      <guid>https://dev.to/bsiscanu/the-package-manager-for-web-components-4b92</guid>
      <description>&lt;p&gt;&lt;strong&gt;Update: Webpack was deprecated in favor of Stencil compiler (v. 0.5.0)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We released an alpha version of the zero-configuration package manager for React components.&lt;/p&gt;

&lt;p&gt;It helps developers to publish and to reuse any component directly from an existing app, no metadata or configuration files required. Basically, Domy will reuse the configuration data of your main app to transpile the component (ex. webpack.config.js).&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/teamdomy" rel="noopener noreferrer"&gt;
        teamdomy
      &lt;/a&gt; / &lt;a href="https://github.com/teamdomy/domy" rel="noopener noreferrer"&gt;
        domy
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Custom Elements Storage
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Custom Elements storage&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/teamdomy/domy/blob/master/LICENSE.md" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/66983804d9ebbae354e7de8ea1881fb16d413dc0524f91529369a1862576ea56/68747470733a2f2f696d672e736869656c64732e696f2f686578706d2f6c2f706c75672e737667" alt="License"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/b046f574a5c8962092e950480cd4cd5d0ce526b4ad38d2c494d0a3af83fde2d3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f7465616d646f6d792f646f6d792e737667"&gt;&lt;img src="https://camo.githubusercontent.com/b046f574a5c8962092e950480cd4cd5d0ce526b4ad38d2c494d0a3af83fde2d3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f7465616d646f6d792f646f6d792e737667" alt="Issues"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Utilization&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;Sign up by using your &lt;code&gt;username&lt;/code&gt;, &lt;code&gt;password&lt;/code&gt; and &lt;code&gt;email&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;domy signup&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Log in to the system from another computer or using another account:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;domy login&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Compile the project using Stencil and after publish it, submitting the whole directory:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;domy publish --version 0.1.0&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;em&gt;Execute the command in the root (base) directory of your project&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The version is optional. Non-versioned components will be sent to the &lt;strong&gt;master&lt;/strong&gt; branch&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It's possible to publish just one component by passing its &lt;strong&gt;class name&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;domy publish MyComponent --version 0.1.0&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Install the component in another project using its &lt;strong&gt;class name&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;domy install MyComponent --version 0.1.0&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;em&gt;Installed components will be tracked in package.json &lt;code&gt;webcomponents&lt;/code&gt; compartment&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To install all components listed in package.json &lt;code&gt;webcomponents&lt;/code&gt; compartment, drop the &lt;strong&gt;class name&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;domy install&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Components are installed in the &lt;strong&gt;node_modules/@&lt;/strong&gt; directory and could be reused in another &lt;strong&gt;Stencil&lt;/strong&gt; application:&lt;/p&gt;
&lt;div class="highlight highlight-source-js notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-c"&gt;// master is a non-versioned&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/teamdomy/domy" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The current release supports only React components, no Angular or Web components for the moment. It's coming after alpha test stage.&lt;/p&gt;

&lt;p&gt;In order to start your journey into the magical world of the Domy's package manager, install it first:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;npm install -g domy-cli&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;... and create your personal account by executing:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;domy signup&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;it will ask for your username, password, and email.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Then, navigate up to the root directory of your best React app and publish the desired component to the registry. Domy will detect the configuration of your main app and will apply it to the process of packing the component:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;domy publish &lt;code&gt;&amp;lt;&lt;/code&gt;name&lt;code&gt;&amp;gt;&lt;/code&gt; &lt;code&gt;&amp;lt;&lt;/code&gt;file&lt;code&gt;&amp;gt;&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In the above example, we use angle brackets as an example of parameters that are expected. In our case, it is the name of a component and the path to the file where it is stored. The path is relative to the root of the app.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Finally, navigate to the root directory of another project with initiated npm package.json and execute the command install:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;domy install &lt;code&gt;&amp;lt;&lt;/code&gt;name&lt;code&gt;&amp;gt;&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;It will create new components directory in the root of your project and will drop component right there. Installed component can be required as a simple local file/module.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;What else? I supposed that's it for now. Come as you are, try our awesome library aka package manager and don't forget to give us a star on Github. Thanks&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>react</category>
      <category>webcomponents</category>
    </item>
    <item>
      <title>Introducing darkwasp library</title>
      <dc:creator>Boris Siscanu</dc:creator>
      <pubDate>Mon, 17 Sep 2018 08:19:22 +0000</pubDate>
      <link>https://dev.to/bsiscanu/web-workers-how-to-make-the-website-faster-kme</link>
      <guid>https://dev.to/bsiscanu/web-workers-how-to-make-the-website-faster-kme</guid>
      <description>&lt;p&gt;&lt;strong&gt;Update: Darkwasp joined Domy project (web components).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most of the websites right now use one processor core out of many, by doing so they reduce the user experience considerably, freezing the entire web in its actual state of progress. In the era of Deep Learning and real-time experience, it seems that the web hit the wall.&lt;/p&gt;

&lt;p&gt;Why is this all happening? The reason is dead simple — thread safety. Web Workers were made isolated by design and the most inconvenient thing out of this is the constraint to run the Web Worker from a separate file.&lt;/p&gt;

&lt;p&gt;Consequently, to facilitate the work with parallel processes in web environment, we came out with new library called The Dark Wasp. In a nutshell, the idea is to save the biggest part of the web app code in the storage and load it on request in a separate thread, no need to load the entire codebase all at once. The same functions could be used in frontend and backend (web browser or Node.js).&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i3JOwpme--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/teamdomy"&gt;
        teamdomy
      &lt;/a&gt; / &lt;a href="https://github.com/teamdomy/wasp"&gt;
        wasp
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Web Workers Superset
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
The Distributed Storage for Functions&lt;/h1&gt;
&lt;p&gt;The package makes simple the work with parallel processes (websites on multi-core processor). It supports web browsers and backend clients.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.apache.org/licenses/LICENSE-2.0" rel="nofollow"&gt;Apache 2.0 License&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
Starting the first app&lt;/h3&gt;
&lt;p&gt;To start the work call the &lt;code&gt;connect&lt;/code&gt; function, it returns the &lt;code&gt;Promise&lt;/code&gt; and listens for an object with 2 properties:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;app&lt;/code&gt; - the name of your app/storage and&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;peer&lt;/code&gt; - secret and unique &lt;code&gt;UID&lt;/code&gt; of the user (think about it as the username and the password in one string).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The package provides 3 core types named &lt;code&gt;agents&lt;/code&gt;: &lt;code&gt;Peer&lt;/code&gt;, &lt;code&gt;Wasp&lt;/code&gt; and &lt;code&gt;Swarm&lt;/code&gt;. All&lt;code&gt;agent&lt;/code&gt; methods return the &lt;code&gt;Promise&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For the purpose of the example, lets create and save 2 files with functions, we will store them lately:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;random.js&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight highlight-source-js js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-smi"&gt;module&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;exports&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-k"&gt;function&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt;
  &lt;span class="pl-k"&gt;return&lt;/span&gt; &lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-v"&gt;Math&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;random&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt; &lt;span class="pl-c1"&gt;+&lt;/span&gt; &lt;span class="pl-c1"&gt;10&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;toString&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-c1"&gt;7&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;
&lt;span class="pl-kos"&gt;}&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;em&gt;fibonacci.js&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight highlight-source-js js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-smi"&gt;module&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/teamdomy/wasp"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;To access the storage, we’ll need the name of the storage itself - “app” property and the unique identifier of the current user - “peer” property. If the storage with the given name doesn’t exist, it’ll be created and the user will get owners rights. Latest joined users will have limited rights, being simple peers.&lt;/p&gt;

&lt;p&gt;Now, for the sake of example, let’s create a random function:&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;In the example above, app.wasp.random.set() means create the wasp (lambda function) with the name “random” and the code which follows in set() method. In the same time, storage doesn’t exist, so the “peer” will get owner rights.&lt;/p&gt;

&lt;p&gt;Next, deliver the function to the storage by executing the file:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;node store.js&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Done! Further use of stored functions is a piece of cake, in the browser it looks as follows:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;… and the Node.js environment (the “peer” is not the first, so no special treatment in this case)&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;That’s it!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>node</category>
      <category>angular</category>
    </item>
  </channel>
</rss>
