Skip to content

Commit

Permalink
added README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkirathe committed Sep 4, 2024
1 parent 5468c6b commit b753919
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions netlify/functions/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ import jwt from 'jsonwebtoken';
import swaggerJsdoc from 'swagger-jsdoc';
import {swaggerOptions} from './swaggerConfig.js';
// import morgan from 'morgan';
// import cors from 'cors';
import cors from 'cors';
import swaggerUi from 'swagger-ui-express';
import express, {Router} from "express";
// import {io} from "socket.io-client";
Expand All @@ -134,15 +134,15 @@ const api = express();

const router = Router();

// api.use(express.json());
api.use(express.json());
// api.use(morgan('combined', {
// stream: {
// write: (message) => {
// io.emit('log', message.trim());
// }
// }
// })); // Log all requests
// api.use(cors()); // Enable CORS for all routes
api.use(cors()); // Enable CORS for all routes

const users = [
{ id: 1, email: 'user@example.com', password: 'password', role: 'user' },
Expand Down

0 comments on commit b753919

Please sign in to comment.