Skip to content

Instantly share code, notes, and snippets.

import express from 'express';
import { createServer } from 'http';
import cors from 'cors'
const app = express();
const server = createServer(app);
app.use(cors({
origin: '*',
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],