Allow CORS

This commit is contained in:
2022-05-03 20:27:04 +02:00
parent 87e7df5f90
commit b58a44392f
3 changed files with 38 additions and 0 deletions

View File

@ -6,9 +6,11 @@ import {
getClasses,
} from "./api/index.js";
import { Parser } from "./parser/index.js";
import cors from "cors";
const app = express();
const port = process.env.PORT || 3000;
app.use(cors());
if (!process.env.DSB_USER || !process.env.DSB_PASSWORD) {
console.error("Error: DSB Auth environment variables missing!");