Skip to content

Instantly share code, notes, and snippets.

@YodaheaD
YodaheaD / NextDeploymentToAppService.yml
Created April 8, 2026 12:46
Next JS deployment to Azure App Service
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy Node.js app to Azure Web App - your-app-name
on:
push:
branches:
- main
workflow_dispatch:
@YodaheaD
YodaheaD / UploadWMulter.md
Last active November 1, 2023 18:16
Multer with Express and React

Sending Files with Multer and React

  1. Info
  2. How it works
  3. The code

1) Info:

This is for uploading multiple files from Front -> Backend using Multer and React.

  • Using: Express as Backend, NextJS(React) as Front
@YodaheaD
YodaheaD / myFakerscript.js
Last active November 1, 2023 18:23
Quick script for Faker to JSON file
const { faker } = require("@faker-js/faker");
const fs = require("fs");
function test(){
const data=[]
for(let i=0;i<10;i++){
data.push({
field1: faker.number.int({ min: 100000, max: 100010 }),
field2: faker.number.int({ min: 10000000000000, max: 10000000000010 }),
@YodaheaD
YodaheaD / GetStartedwNode.md
Last active November 11, 2023 17:12
Get started Node/Express project

Build Node/Express App with TS

- Follow these intructions for starting a node (or express) project.

  • Comes with: Typescript, nodemon, concurrently and express

1) Start with running all the npm commands

npm init --yes
@YodaheaD
YodaheaD / MsalWrapper
Created August 30, 2023 21:00
MSAL wrapper component for NextJS apps
"use client";
import { MsalProvider } from "@azure/msal-react";
import { msalInstance } from "../../config/msal";
import React from "react";
type Props = {
children?: React.ReactNode;
};
@YodaheaD
YodaheaD / tailwindconfig.js
Last active October 9, 2023 01:16
General Tailwind config file for ShadCn UI
const { fontFamily } = require("tailwindcss/defaultTheme")
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: ["class"],// content: ["app/**/*.{ts,tsx}", "components/**/*.{ts,tsx}"],
content: ["app/**/*.{ts,tsx}",
"components/**/*.{ts,tsx}",
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',