<?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: Kenechukwu Josiah</title>
    <description>The latest articles on DEV Community by Kenechukwu Josiah (@kenechukwujosiah).</description>
    <link>https://dev.to/kenechukwujosiah</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%2F836741%2F41586870-291b-4252-a90a-91b81ea4c1ff.jpg</url>
      <title>DEV Community: Kenechukwu Josiah</title>
      <link>https://dev.to/kenechukwujosiah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kenechukwujosiah"/>
    <language>en</language>
    <item>
      <title>7 Reasons why you should start using Nuxtjs</title>
      <dc:creator>Kenechukwu Josiah</dc:creator>
      <pubDate>Tue, 27 Feb 2024 11:35:32 +0000</pubDate>
      <link>https://dev.to/kenechukwujosiah/7-reasons-why-you-should-start-using-nuxtjs-2173</link>
      <guid>https://dev.to/kenechukwujosiah/7-reasons-why-you-should-start-using-nuxtjs-2173</guid>
      <description>&lt;p&gt;Let's begin by understanding what Nuxt is. Nuxt is an open-source framework built on Vue.js. It's type safe and highly performant. One of its cool features is that it uses directory structure to automate a lot of tasks. For example, it automatically defines routes based on the file structure in the pages directory, enables code splitting for faster loading times, and supports server-side rendering by default. It also provides features like automatic import using composables in the composables directory. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Nuxt works&lt;/strong&gt;&lt;br&gt;
Nuxt uses the Nitro server to serve various rendering modes, such as SSR, SPA, and ISA. By default, it uses SSR, which means the initial page is rendered on the server, and then JavaScript handles subsequent page routing on the client side. One of the coolest features is the ability to configure the rendering mode according to your needs. Nuxt is designed to run in any environment. For more information, &lt;a href="https://nuxt.com/docs/getting-started/deployment"&gt;visit&lt;/a&gt; . Additionally, Nuxt comes pre-configured with TypeScript, removing the need to set it up manually. Furthermore, Nuxt handles code splitting automatically.&lt;/p&gt;

&lt;h6&gt;
  
  
  &lt;em&gt;With that being said, let's delve into my top 7 reasons why you should start using Nuxt.js.&lt;/em&gt;
&lt;/h6&gt;

&lt;p&gt;&lt;strong&gt;1. Rendering mode&lt;/strong&gt;&lt;br&gt;
By default, Nuxt uses SSR as its rendering mode, ensuring faster load times and a better user experience. Additionally, it improves performance by sending minimal JavaScript to the client, achieved through code-splitting. You have the option of configuring your preferred render mode.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. SEO&lt;/strong&gt;&lt;br&gt;
With Nuxt's head configuration or its built-in composable, you can enhance your Nuxt app SEO. Although Nuxt provides sane SEO by default, you can further customize it. You can also use useSeoMeta, which allows you to define your site's SEO meta tags as a flat object with full TypeScript support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Server/Fullstack application&lt;/strong&gt;&lt;br&gt;
Nuxt utilizes Nitro as its server engine, providing complete control over the server-side of your application. It automatically generates your server API by scanning files in the &lt;code&gt;server/api/&lt;/code&gt; directory and server middleware from &lt;code&gt;server/middleware/&lt;/code&gt;. This capability enables you to develop full-stack applications with Nuxt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Routing&lt;/strong&gt;&lt;br&gt;
One of the standout features of Nuxt is its file-system routing, which automatically creates a route for each file in the &lt;code&gt;pages/&lt;/code&gt; directory. Nuxt leverages Vue Router internally, enabling routing by analyzing and converting the folder structure into its Vue Router configuration. Cool right? 😁&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Data Fetching&lt;/strong&gt;&lt;br&gt;
With Nuxt's &lt;code&gt;useFetch&lt;/code&gt;, &lt;code&gt;useAsyncData&lt;/code&gt;, and &lt;code&gt;$fetch&lt;/code&gt; composable functions, which are built into the framework, you can make API calls to fetch data in both browser and server environments within your application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. State management&lt;/strong&gt;&lt;br&gt;
Nuxt uses a robust state management library internally to handle state. You can access state it using its &lt;code&gt;useState&lt;/code&gt; composable. For more info &lt;a href="https://nuxt.com/docs/getting-started/state-management"&gt;visit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Deployment&lt;/strong&gt;&lt;br&gt;
Nuxt is built to be compatible with various environments, including Node.js servers, serverless setups, and edge environments. To deploy your Nuxt application, you can run &lt;code&gt;nuxt build&lt;/code&gt;, which will generate an output directory named &lt;code&gt;.output&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;And there you have it—my top 7 reasons why you should consider using Nuxt. For more information or to start using Nuxt, visit &lt;a href="https://nuxt.com/"&gt;nuxt.com&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>frontend</category>
      <category>vue</category>
      <category>nuxt</category>
    </item>
    <item>
      <title>Build and Deploy Images on AWS ECR Using Github Workflow Action</title>
      <dc:creator>Kenechukwu Josiah</dc:creator>
      <pubDate>Tue, 30 Jan 2024 20:22:16 +0000</pubDate>
      <link>https://dev.to/kenechukwujosiah/build-and-deploy-images-on-aws-ecr-using-github-workflow-action-5b69</link>
      <guid>https://dev.to/kenechukwujosiah/build-and-deploy-images-on-aws-ecr-using-github-workflow-action-5b69</guid>
      <description>&lt;p&gt;In this article, I'll guide you on deploying container images to AWS ECR using the GitHub workflow action. You don't have to possess advanced expertise in DevOps or AWS; a basic understanding of GitHub, AWS cli, and container building (docker) is all that's required. That being said, let's get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Setup a github repo and push code to repo&lt;/li&gt;
&lt;li&gt;Configure AWS Cli&lt;/li&gt;
&lt;li&gt;Create an ECR Repo&lt;/li&gt;
&lt;li&gt;Add a Github Secret&lt;/li&gt;
&lt;li&gt;Setup Github Workflow&lt;/li&gt;
&lt;li&gt;Test 🥳🥳&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 1: Setup a github repo and push code to the repo:
&lt;/h3&gt;

&lt;p&gt;I will be using a mini Python project for demonstration. Feel free to either pull the &lt;a href="https://github.com/kenechukwuJosiah/image-auto-ecr-deployment" rel="noopener noreferrer"&gt;existing project&lt;/a&gt; or create your own, ensure that Docker is initialized and configured.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Configure AWS Cli
&lt;/h3&gt;

&lt;p&gt;Ensure that you have set up AWS CLI on your local machine. Please note that configuring AWS is necessary to create our ECR repository directly from the terminal.&lt;/p&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%2Fuploads%2Farticles%2F3k3gfiqjzsu9nj01qfeg.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%2Fuploads%2Farticles%2F3k3gfiqjzsu9nj01qfeg.png" alt="configure aws credential "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Running the command &lt;code&gt;aws configure&lt;/code&gt; will prompt you to input your AWS Access Key ID, AWS Secret Access Key, and region.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Create ECR Repo
&lt;/h3&gt;

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

aws ecr create-repository \
    --repository-name demo-repository \
    --region us-east-1


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

&lt;/div&gt;

&lt;p&gt;You should get a response like this&lt;/p&gt;


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

&lt;p&gt;{&lt;br&gt;
    "repository": {&lt;br&gt;
        "repositoryArn": "arn:aws:ecr:us-east-1:782020064947:repository/demo-repository",&lt;br&gt;
        "registryId": "782020064947",&lt;br&gt;
        "repositoryName": "demo-repository",&lt;br&gt;
        "repositoryUri": "782020064947.dkr.ecr.us-east-1.amazonaws.com/demo-repository",&lt;br&gt;
        "createdAt": "2024-01-30T20:02:18.973000+01:00",&lt;br&gt;
        "imageTagMutability": "MUTABLE",&lt;br&gt;
        "imageScanningConfiguration": {&lt;br&gt;
            "scanOnPush": false&lt;br&gt;
        },&lt;br&gt;
        "encryptionConfiguration": {&lt;br&gt;
            "encryptionType": "AES256"&lt;br&gt;
        }&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

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

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Step 4: Add Github Secret&lt;br&gt;
&lt;/h3&gt;

&lt;p&gt;Go to the settings of your GitHub repository and input your AWS keys. Trust me, it's crucial to keep them confidential and not expose them for security reasons! 😁&lt;/p&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%2Fuploads%2Farticles%2Fyit4phxv45s4ppmqmfx4.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%2Fuploads%2Farticles%2Fyit4phxv45s4ppmqmfx4.png" alt="Gihub secret image"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Setup Github Workflow
&lt;/h3&gt;

&lt;p&gt;In this step, you are required to create a &lt;code&gt;.github/workflows&lt;/code&gt; directory in the main working project folder. Subsequently, create a &lt;code&gt;yaml&lt;/code&gt; file within this directory where we will define our workflow for deploying to AWS ECR. I called mine &lt;code&gt;docker-ecr-workflow.yaml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This workflow gets triggered each time there's a pull request to the main branch and can also be manually triggered. It comprises two jobs, namely "test" and "build." Within the "build" job, there are four steps designed to handle code checkout, AWS credential configuration, logging into ECR, and building or pushing our Docker image. Do well to customize the workflow to suite your need.&lt;/p&gt;

&lt;p&gt;Ensure that your IAM user account has the required ECR policy attached; otherwise, you won't be able to proceed.&lt;/p&gt;


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

&lt;p&gt;name: Docker Image ECR Deployment&lt;/p&gt;

&lt;p&gt;on:&lt;br&gt;
  workflow_dispatch:&lt;br&gt;
  pull_request:&lt;br&gt;
    branches:&lt;br&gt;
      - main&lt;/p&gt;

&lt;p&gt;env:&lt;br&gt;
  PYTHON_VERSION: "3.9"&lt;/p&gt;

&lt;p&gt;jobs:&lt;br&gt;
  test:&lt;br&gt;
    runs-on: ubuntu-latest&lt;br&gt;
    steps:&lt;br&gt;
      - name: Test Code&lt;br&gt;
        run: echo "Testing done....."&lt;/p&gt;

&lt;p&gt;build:&lt;br&gt;
    runs-on: ubuntu-latest&lt;br&gt;
    continue-on-error: false&lt;br&gt;
    steps:&lt;br&gt;
      - name: Checkout code&lt;br&gt;
        uses: actions/checkout@v3&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  - name: Configure AWS Credentials
    uses: aws-actions/configure-aws-credentials@v4
    with:
      aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
      aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
      aws-region: us-east-1

  - name: Login to Amazon ECR
    id: login-ecr
    uses: aws-actions/amazon-ecr-login@v2

  - name: Build, tag, and push docker image to Amazon ECR
    env:
      REGISTRY: ${{ steps.login-ecr.outputs.registry }}
      REPOSITORY: demo-repository
      IMAGE_TAG: ${{ github.sha }}
    run: |
      docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG .
      docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG
&lt;/code&gt;&lt;/pre&gt;

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

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Finally!!!!!! Lets Test 🥳🥳🥳🥳🥳&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;You have the option to manually initiate your workflow or create a pull request to the main branch for the building and deployment of your image. I appreciate your reading until this stage!&lt;/p&gt;

&lt;p&gt;Our workflow successfully ran!!!&lt;br&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%2Fuploads%2Farticles%2Fyzxsh5jph3f71vywrh62.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%2Fuploads%2Farticles%2Fyzxsh5jph3f71vywrh62.png" alt="github workflow pipline"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now navigate to your AWS ECR dashobard to view your newly deployed image&lt;br&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%2Fuploads%2Farticles%2Fu4tkoeg3cbyahg4gd33e.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%2Fuploads%2Farticles%2Fu4tkoeg3cbyahg4gd33e.png" alt="Aws Ecr dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cloud</category>
      <category>docker</category>
      <category>aws</category>
    </item>
  </channel>
</rss>
