Skip to content

Instantly share code, notes, and snippets.

@dp0613
dp0613 / main.js
Created February 16, 2023 06:03
Config basicAuth and JWT for swagger - NestJS
import * as dotenv from 'dotenv';
dotenv.config();
import { NestFactory } from '@nestjs/core';
import { INestApplication } from '@nestjs/common';
import * as basicAuth from 'express-basic-auth';
import {
SwaggerModule,
DocumentBuilder,
SwaggerDocumentOptions,
SwaggerCustomOptions,
@dp0613
dp0613 / gist01.md
Created November 22, 2022 12:40
Fix docker lookup no such host - Work on both Linux and Windows WSL
# List your network interfaces
$ ip a

# Add Netplan config file and edit as below 
# REMEMBER edit your eth0 name according to your network interface
$ sudo nano /etc/netplan/01-docker.yaml

# If on linux
$ sudo netplan apply