/socketio-chat-app

Simple chat app made with Next.js and Socket.io

Primary LanguageTypeScript

Socket.io Chat App with Next.js

A chat application built with Next.js (for client) and Socket.io (for server), setup for Kubernetes engine.

This project is featured in three-part series:

Prerequisites

  • Application
    • Node.js
    • NPM
    • Yarn
    • Install dependencies (for client and server) by using yarn install
  • Infrastructure
    • Terraform CLI
    • kubectl (Kubernetes control CLI)

How to

Run application locally

Client

  1. Run yarn start

Server

  1. Run yarn dev

Build Docker images

Go to client and/or server folder, then run docker build -t [image tag] .

Use Terraform

  1. Go to terraform-k8s folder.
  2. Run terraform init.
  3. Run terraform plan to show Terraform plans.

Use Kubernetes

  1. Install kubectl.
  2. Go to terraform-k8s folder.
  3. Run kubectl apply $(ls *.yaml | awk ' { print " -f " $1 } ').

Resources