mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2025-07-05 10:35:08 +02:00
15 lines
246 B
JavaScript
15 lines
246 B
JavaScript
const express = require( 'express' )
|
|
const cors = require( 'cors' )
|
|
|
|
// CORS enabled express generator
|
|
module.exports = f => {
|
|
|
|
// Create express server
|
|
const app = express()
|
|
|
|
// Enable CORS
|
|
app.use( cors( { origin: true } ) )
|
|
|
|
return app
|
|
|
|
} |