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 b753919 commit e76532b
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions netlify/functions/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ import serverless from "serverless-http";
import jwt from 'jsonwebtoken';
import swaggerJsdoc from 'swagger-jsdoc';
import {swaggerOptions} from './swaggerConfig.js';
// import morgan from 'morgan';
import morgan from 'morgan';
import cors from 'cors';
import swaggerUi from 'swagger-ui-express';
import express, {Router} from "express";
Expand All @@ -135,13 +135,14 @@ const api = express();
const router = Router();

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

const users = [
Expand Down

0 comments on commit e76532b

Please sign in to comment.