Setting up jwt api things:
const options = new DocumentBuilder()
.setTitle('My App')
.setSchemes('https')
.setDescription('My App API documentation')
.setVersion('1.0')
.addBearerAuth()| # Stage 1: Build the application | |
| FROM node:18-alpine AS builder | |
| # Set working directory | |
| WORKDIR /app | |
| # A wildcard is used to ensure both package.json AND package-lock.json are copied | |
| COPY package*.json ./ | |
| # Install all app dependencies |
| minikube stop; minikube delete && | |
| docker stop $(docker ps -aq) && | |
| rm -rf ~/.kube ~/.minikube && | |
| sudo rm -rf /usr/local/bin/localkube /usr/local/bin/minikube && | |
| launchctl stop '*kubelet*.mount' && | |
| launchctl stop localkube.service && | |
| launchctl disable localkube.service && | |
| sudo rm -rf /etc/kubernetes/ && | |
| docker system prune -af --volumes |
Here are two approaches to achieve your goal:
Create a LoadBalancer Service: Define a LoadBalancer service in your Kubernetes manifest for your Traefik deployment. This service automatically provisions an AWS Elastic Load Balancer (ELB). Configure Traefik Ingress: Create an Ingress resource that points to your Traefik service. This tells Traefik to route incoming traffic based on the defined rules. External Access: The ELB gets a public DNS name. You can use this DNS name to access your application externally. 2. NodePort Service with Traefik (Limited Use Case):
Note: This approach is generally not recommended for production due to security concerns and managing individual node IPs.
| cd ~/Library/Android/sdk/build-tools/34.0.0 && cp d8 dx && cd lib && cp d8.jar dx.jar |
| // Generate voucher number | |
| // using mpesa transaction reference format -> YYMMDDHHmmssNNNN | |
| export function generateVoucherNumber(): string { | |
| const now = new Date(); | |
| const yearMap = { | |
| '20': 'A', | |
| '21': 'B', | |
| '22': 'C', | |
| '23': 'D', | |
| '24': 'E', |
| # Install Operating system and dependencies | |
| FROM ubuntu:22.04 as build-env | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN apt-get update | |
| RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback python3 | |
| RUN apt-get clean | |
| ENV DEBIAN_FRONTEND=dialog |
| import { useEffect } from 'react'; | |
| import useLocalStorage from './use-local-storage.hooks'; | |
| const useColorMode = () => { | |
| const [colorMode, setColorMode] = useLocalStorage('color-theme', 'light'); | |
| useEffect(() => { | |
| const className = 'dark'; | |
| const bodyClass = window.document.body.classList; |
| /* | |
| * Copyright (c) 2023 | |
| * All rights reserved. @Patrick Waweru | |
| */ | |
| import axios, {AxiosInstance, AxiosRequestConfig, AxiosResponse} from 'axios'; | |
| import {destory, getAccessToken} from './SharePreference'; | |
| import {AppConstants} from './Constants'; | |
| export class HttpClient { | |
| private axiosInstance?: AxiosInstance; |
| const images = [ | |
| "https:/...", | |
| "https:/...", | |
| "https:/...", | |
| ]; | |
| const Carousel = () => { | |
| const [index,setIndex] = useState(0); | |
| const goToNextSlide = () => { |