Skip to content

Instantly share code, notes, and snippets.

View adjeim's full-sized avatar

Mia Adjei adjeim

View GitHub Profile
.host-panel {
position: fixed;
right: -34%;
top: 0;
padding: 1rem 2rem;
height: 100vh;
width: 30%;
box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
background-color: rgb(124, 169, 227);
border-left: 7px solid rgb(41, 103, 184);
@adjeim
adjeim / CORS Cheat Sheet for Express + TypeScript.md
Last active March 20, 2024 07:37
CORS Cheat Sheet for Express + TypeScript
  1. Install cors package and its TypeScript types:
npm install cors
npm install --save-dev @types/cors
  1. Update the entry point of your Express app to allow your server to use cors middleware. Configure your CORS options with the origins you would like to allow.
import express from 'express';