<?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: Joseph Peculiar</title>
    <description>The latest articles on DEV Community by Joseph Peculiar (@codaelux).</description>
    <link>https://dev.to/codaelux</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%2F179828%2Fb47f2443-a7fd-4c41-aaec-c35137ca4e7a.png</url>
      <title>DEV Community: Joseph Peculiar</title>
      <link>https://dev.to/codaelux</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codaelux"/>
    <language>en</language>
    <item>
      <title>How to open/edit/bind ports to running Docker Containers</title>
      <dc:creator>Joseph Peculiar</dc:creator>
      <pubDate>Thu, 05 Nov 2020 03:02:04 +0000</pubDate>
      <link>https://dev.to/codaelux/how-to-open-edit-bind-ports-to-running-docker-containers-1a34</link>
      <guid>https://dev.to/codaelux/how-to-open-edit-bind-ports-to-running-docker-containers-1a34</guid>
      <description>&lt;p&gt;You have a running production container (a synced node) and you would want to either edit or bind new ports in this container, as opposed to spinning up a new container.&lt;/p&gt;

&lt;p&gt;The following steps should aid you to achieve this.&lt;/p&gt;

&lt;h4&gt;
  
  
  1.Stop the running Container
&lt;/h4&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 docker stop &amp;lt;container-id&amp;gt; 

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

&lt;/div&gt;
&lt;h4&gt;
  
  
  2.Open Docker containers directory
&lt;/h4&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 /var/lib/docker/containers/ 

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

&lt;/div&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 cd &amp;lt;container-id&amp;gt; 

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

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F538qwwmunzgy5867eghc.png" class="article-body-image-wrapper"&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-uploads.s3.amazonaws.com%2Fi%2F538qwwmunzgy5867eghc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3.Edit hostconfig.json
&lt;/h4&gt;

&lt;p&gt;Open &lt;code&gt;hostconfig.json&lt;/code&gt; with nano or vim &lt;br&gt;
locate and edit &lt;code&gt;PortBindings&lt;/code&gt; with the new ports you want to edit, open or delete.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;for instance&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 "PortBindings":{"18332/tcp":[{"HostIp":"","HostPort":"18332"}],"18334/tcp":[{"HostIp":"","HostPort":"18334"}]} 

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

&lt;/div&gt;
&lt;h4&gt;
  
  
  4.Restart Docker
&lt;/h4&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 systemctl restart docker 

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

&lt;/div&gt;
&lt;h4&gt;
  
  
  5.Start container
&lt;/h4&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 docker start &amp;lt;container-id&amp;gt; 

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

&lt;/div&gt;

</description>
      <category>docker</category>
      <category>linux</category>
    </item>
    <item>
      <title>Binance Chain Dev Series: Part II - Issuing BEP2 Token</title>
      <dc:creator>Joseph Peculiar</dc:creator>
      <pubDate>Sun, 05 Apr 2020 16:23:33 +0000</pubDate>
      <link>https://dev.to/codaelux/binance-chain-series-part-ii-issuing-bep2-token-51a</link>
      <guid>https://dev.to/codaelux/binance-chain-series-part-ii-issuing-bep2-token-51a</guid>
      <description>&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Binance Chain development series&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/codaelux/how-to-set-up-a-binance-chain-node-4bb4"&gt;chapter 1:- Setting up a light Binance node&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/codaelux/binance-chain-series-part-ii-issuing-bep2-token-51a"&gt;chapter 2:- Issuing a BEP2 token on Binance Chain&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;chapter 3:- Adding our BEP2 to Binance Dex and Interacting with it using the CLI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;chapter 4:-  &lt;em&gt;Adding token to trust wallet&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;chapter 5:- &lt;em&gt;Setting up a full Binance Chain node&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;chapter 6:- &lt;em&gt;Using the Binance Chain SDK&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In the previous chapter, we looked into setting up a light client on the Binance chain blockchain. In this chapter, we will issue a BEP2 token on Binance chain mainnet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3i8Ql9IS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/le29cl1gaqtqjwml4qol.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3i8Ql9IS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/le29cl1gaqtqjwml4qol.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;BEP stands for " Binance Chain evolution proposal" and BEP2  tokens are assets on Binance chain which follow the &lt;a href="https://github.com/binance-chain/BEPs/blob/master/BEP2.md"&gt;BEP2 standard&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Binance Chain at the time of writing does not support smart contracts as seen on the Ethereum blockchain, according to the Binance chain community this was an intentional design decision to improve the performance of the system and eliminate having to support unnecessary features.&lt;/p&gt;

&lt;p&gt;for more here's an interesting &lt;a href="https://www.reddit.com/r/binance/comments/beng4t/how_can_binance_chain_compete_with_eth_if_binance/"&gt;thread&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Let's get our hands dirty
&lt;/h2&gt;

&lt;p&gt;There are 3 steps in this chapter:&lt;/p&gt;

&lt;p&gt;1) Create a Wallet&lt;/p&gt;

&lt;p&gt;2) Connect our wallet to our node using bnbcli &lt;/p&gt;

&lt;p&gt;3) Issue our token&lt;/p&gt;

&lt;p&gt;cd into the &lt;code&gt;node-binary&lt;/code&gt; folder which we downloaded in the &lt;a href="https://dev.to/codaelux/how-to-set-up-a-binance-chain-node-4bb4"&gt;previous chapter&lt;/a&gt; &lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd cli/{network}/{version}/{OS}
cd cli/prod/0.6.3/linux 
./bnbcli
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To create a wallet goto &lt;a href="https://www.binance.org/"&gt;Binance Website&lt;/a&gt; or &lt;a href="https://testnet.binance.org/create"&gt;testnet&lt;/a&gt; for testnet&lt;/p&gt;

&lt;p&gt;or we can generate one using the bnbcli&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./bnbcli keys add binance-series

&amp;gt; Enter a passphrase for your key:
&amp;gt; Repeat the passphrase:
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;binance-series&lt;/code&gt; above is used to specify the alias name of the wallet. you can change this to any name of your preference.&lt;/p&gt;

&lt;p&gt;Now we can see our wallet&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WQQJF6YT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/byi8n1iu6oh02yw34hq1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WQQJF6YT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/byi8n1iu6oh02yw34hq1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Keep your Mnemonic and Keystore safe, once compromised you lose all assets in your wallet&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To add an already existing wallet  use the  &lt;code&gt;—recover&lt;/code&gt;&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./bnbcli keys add binance-series --recover
&amp;gt; Enter a passphrase for your key
&amp;gt; Repeat the passphrase
&amp;gt; Enter your recovery seed phrase
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To  Issue a token on the Binance Chain we need to make sure our wallet has a minimum of 500BNB which is the fee collected for issuing a token,  for more details on this click &lt;a href="https://docs.binance.org/guides/concepts/fees.html#fix-fee-table"&gt;here&lt;/a&gt;   &lt;/p&gt;

&lt;p&gt;To issue our token  "Binance Dev Series" ( BDS) with the supply of 1billion &lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./bnbcli token issue --token-name "Binance Dev Series" --total-supply 100000000000000000 --symbol BDS --mintable --from binance-series --chain-id Binance-Chain-Tigris --node [https://dataseed5.defibit.io:443](https://dataseed5.defibit.io/) --trust-node
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;We have issued our token&lt;/strong&gt; 🎉🎉&lt;/p&gt;

&lt;p&gt;&lt;code&gt;—from binance-series&lt;/code&gt;:- from our alias wallet named &lt;code&gt;binance-series&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;—mintable&lt;/code&gt;:- The token is mintable ( you can remove this if your token requirement dosen't need it).&lt;/p&gt;

&lt;p&gt;Always add an 8 decimal after the supply you intend for your token  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ERROR&lt;/strong&gt;: No account with address was found in the state. Are you sure there has been a transaction involving it&lt;/p&gt;

&lt;p&gt;if you're getting that error it means you don't have up-to 1BNB in your wallet &lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;Next chapter we will  be Adding our BDS token to the Binance Dex, stay tuned&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>linux</category>
      <category>binance</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Binance Chain Dev Series: Part I - How to set up a Binance chain node</title>
      <dc:creator>Joseph Peculiar</dc:creator>
      <pubDate>Tue, 31 Mar 2020 23:39:29 +0000</pubDate>
      <link>https://dev.to/codaelux/how-to-set-up-a-binance-chain-node-4bb4</link>
      <guid>https://dev.to/codaelux/how-to-set-up-a-binance-chain-node-4bb4</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Binance Chain is a blockchain developed by Binance and its community, that focuses on building a performant matching engine and exchange over a decentralized network.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The Binance chain development series is split into 6 chapters and is meant give you a deep dive into building with Binance chain&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Binance Chain development series&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/codaelux/how-to-set-up-a-binance-chain-node-4bb4"&gt;chapter 1:- Setting up a light Binance node&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/codaelux/binance-chain-series-part-ii-issuing-bep2-token-51a"&gt;chapter 2:- Issuing a BEP2 token on Binance Chain&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;chapter 3:- Adding our BEP2 to Binance Dex and Interacting with it using the CLI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;chapter 4:-  &lt;em&gt;Adding token to trust wallet&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;chapter 5:- &lt;em&gt;Setting up a full Binance Chain node&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;chapter 6:- &lt;em&gt;Using the Binance Chain SDK&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Let's get started
&lt;/h2&gt;

&lt;p&gt;In this section, we are going to set up a VPS light client node on mainnet&lt;/p&gt;

&lt;p&gt;I am assuming you have already set up your cloud VPS server if you haven't click &lt;a href="https://medium.com/@bsovevo/digitalocean-vs-amazon-ec2-vs-google-cloud-vs-linode-bb48e7148050"&gt;here&lt;/a&gt;, I'll jump right into it &lt;/p&gt;

&lt;p&gt;There are two types of Binance Chain client &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Light client:- does not sync state or relay transactions&lt;/li&gt;
&lt;li&gt;Fullnode: - downloads full blockchain and relays transactions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;for more details on these, click &lt;a href="https://docs.binance.org/light-client.html#light-client-versus-full-node"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Let's kick off by downloading the node-binary&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    git clone https://github.com/binance-chain/node-binary.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Cd&lt;/code&gt; into the &lt;code&gt;node-binary&lt;/code&gt; folder you will see the following &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xzgzq6Ee--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hxtqe06990dgnlteh29j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xzgzq6Ee--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hxtqe06990dgnlteh29j.png" alt="https://dev-to-uploads.s3.amazonaws.com/i/hxtqe06990dgnlteh29j.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;let's explore some of the options here &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;CLI&lt;/code&gt;:- this is where we interact with Binance Chain from our VPS, more on this in later Chapters&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Docker&lt;/code&gt;:- setup node using docker&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Fullnode:&lt;/code&gt;- Setting up a fullnode&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Lightnode&lt;/code&gt;:- Setting up a light node
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    cd lightnode/prod/0.6.3/linux
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;version 0.6.3 is latest at time of writing&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Starting our node&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./lightd --chain-id "Binance-Chain-Tigris" --node tcp://dataseed1.binance.org:80 &amp;gt; node.log &amp;amp; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We have our light client running !!!&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s Next?
&lt;/h2&gt;

&lt;p&gt;In the next chapter, we will look at issuing a BEP2 token. Stay tuned!&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>binance</category>
      <category>tutorial</category>
      <category>linux</category>
    </item>
    <item>
      <title>How to run DynamoDB Offline</title>
      <dc:creator>Joseph Peculiar</dc:creator>
      <pubDate>Mon, 23 Mar 2020 21:48:31 +0000</pubDate>
      <link>https://dev.to/codaelux/running-dynamodb-offline-4k1b</link>
      <guid>https://dev.to/codaelux/running-dynamodb-offline-4k1b</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvf4wa3v8uux52cos4d7r.png" class="article-body-image-wrapper"&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-uploads.s3.amazonaws.com%2Fi%2Fvf4wa3v8uux52cos4d7r.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am assuming you are already familiar with the Serverless Framework so I'll jump right into it&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick overview
&lt;/h3&gt;

&lt;p&gt;Amazon DynamoDB:- is a fully managed proprietary NoSQL database service that supports key-value and document data structures designed to deliver fast and predictable performance.&lt;/p&gt;

&lt;p&gt;The Serverless Framework:- enables developers to deploy backend applications as independent functions that will be deployed to AWS Lambda.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting started
&lt;/h3&gt;

&lt;p&gt;let's kick off by configuring  AWS if not already configured doing this you will have to download the AWS CLI for W&lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html" rel="noopener noreferrer"&gt;indows&lt;/a&gt;, &lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/install-macos.html" rel="noopener noreferrer"&gt;macOS&lt;/a&gt;, or &lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html" rel="noopener noreferrer"&gt;Linux&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The serverless framework will need us to configure access to AWS - This is accomplished by running&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws configure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Install Serverless globally if you haven't installed it already &lt;/p&gt;

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

&lt;/div&gt;




&lt;p&gt;Now let's setup up the &lt;em&gt;serverless-offline&lt;/em&gt; plugin&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i -g serverless-offline
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Install &lt;em&gt;serverless-dynamodb-local&lt;/em&gt; plugin&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i serverless-dynamodb-local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Update your &lt;em&gt;serverless.yml&lt;/em&gt; file - add this to the bottom of your &lt;em&gt;serverless.yml&lt;/em&gt; file&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plugins:
  - serverless-dynamodb-local
  - serverless-offline
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Initialize DynamoDB  - this initializes DynamoDB offline in your project folder&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sls dynamodb install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Run serverless:-&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sls offline start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Be sure DynamoDB is running on port 8000 because &lt;em&gt;serverless-offline&lt;/em&gt; will use that port as default&lt;/p&gt;

&lt;p&gt;you should see the output below&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Dynamodb Local Started, Visit: http://localhost:8089/shell
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Keep this console running.&lt;/p&gt;

&lt;p&gt;Now let's setup &lt;a href="https://github.com/aaronshaf/dynamodb-admin" rel="noopener noreferrer"&gt;&lt;em&gt;dynamodb-admin&lt;/em&gt;&lt;/a&gt;: this gives us a good GUI to view our DynamoDB tables&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install dynamodb-admin -g

export DYNAMO_ENDPOINT=http://localhost:8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now run &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dynamodb-admin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We should have our table displayed&lt;/p&gt;

&lt;p&gt;Configuring &lt;em&gt;serverless.yml&lt;/em&gt; for DynamoDB&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dynamodb:
    stages: dev
    start:
      port: 8089 
      # set our custom DynamoDB port
      migrate: true
      # creates tables from serverless config
      seed: true 
      #determines which data to onload
    seed:
      domain:
        sources:
          - table: MyDB-dev
            sources: [./resources/seeds/myDB.json]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;I published a great cheat sheet with all commands needed  for setting up DynamoDB offline you can find it here  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/codaelux/DynamoDB-offline-doc" rel="noopener noreferrer"&gt;https://github.com/codaelux/DynamoDB-offline-doc&lt;/a&gt;&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>aws</category>
      <category>database</category>
      <category>dynamodb</category>
    </item>
  </channel>
</rss>
