<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Parro Nexus – Create a new service/lib</title>
    <link>/dev/new-service/</link>
    <description>Recent content in Create a new service/lib on Parro Nexus</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/dev/new-service/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Dev: NestJS</title>
      <link>/dev/new-service/nestjs/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/dev/new-service/nestjs/</guid>
      <description>
        
        
        &lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;To develop and run a NestJS service you need to install some tools first:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Node: &lt;a href=&#34;https://nodejs.org/en/&#34;&gt;https://nodejs.org/en/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Yarn: &lt;a href=&#34;https://classic.yarnpkg.com/en/docs/install/#mac-stable&#34;&gt;https://classic.yarnpkg.com/en/docs/install/#mac-stable&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Run these commands to check if both are installed&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;node -v
npm -v
yarn -v
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;install-the-nestjs-cli&#34;&gt;Install the NestJS CLI&lt;/h2&gt;
&lt;p&gt;NestJS has its own CLI which is able to generate most boilerplate code. To install the CLI simply run&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;npm install -g @nestjs/cli
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;create-a-new-nestjs-service&#34;&gt;Create a new NestJS service&lt;/h2&gt;
&lt;p&gt;All services are located in the &lt;code&gt;apps&lt;/code&gt; directory. To create a new NestJS prodject go to the apps directory and run&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;nest new [YOUR_SERVICE_NAME]
yarn install
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;run-your-service&#34;&gt;Run your service&lt;/h2&gt;
&lt;p&gt;To run your app run &lt;code&gt;yarn start&lt;/code&gt; and visit http://localhost:3000 in your browser&lt;/p&gt;
&lt;p&gt;To run the tests run &lt;code&gt;yarn test&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;read-the-docs&#34;&gt;Read the docs&lt;/h2&gt;
&lt;p&gt;For more info visit the NestJS docs &lt;a href=&#34;https://docs.nestjs.com/&#34;&gt;https://docs.nestjs.com/&lt;/a&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Dev: Nodejs lib</title>
      <link>/dev/new-service/lib/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/dev/new-service/lib/</guid>
      <description>
        
        
        &lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;To develop and run a nodejs lib you need to install some tools first:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Node: &lt;a href=&#34;https://nodejs.org/en/&#34;&gt;https://nodejs.org/en/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Yarn: &lt;a href=&#34;https://classic.yarnpkg.com/en/docs/install/#mac-stable&#34;&gt;https://classic.yarnpkg.com/en/docs/install/#mac-stable&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Run these commands to check if both are installed&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;node -v
npm -v
yarn -v
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;install-the-parro-connect-schematics&#34;&gt;Install the Parro connect schematics&lt;/h2&gt;
&lt;p&gt;Parro has its own schematics for creating libs.
To use this you need to install the schematics lib.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;npm i -g @parro-connect/schematics
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;create-a-new-lib&#34;&gt;Create a new lib&lt;/h2&gt;
&lt;p&gt;All libs are located in the &lt;code&gt;libs&lt;/code&gt; directory. To create a new lib project go to the libs directory and run&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;nest g -c @parro-connect/schematics connect-lib
cd [YOUR_SERVICE_NAME]
yarn install
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
  </channel>
</rss>
