chore(api): add morgan request logging and types
This commit is contained in:
parent
18dfa5766c
commit
8e76c349eb
@ -3,6 +3,7 @@ import dotenv from 'dotenv';
|
|||||||
dotenv.config({ path: path.resolve(__dirname, '../../../.env') });
|
dotenv.config({ path: path.resolve(__dirname, '../../../.env') });
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
import cors from 'cors';
|
import cors from 'cors';
|
||||||
|
import morgan from 'morgan';
|
||||||
import authRouter from './auth';
|
import authRouter from './auth';
|
||||||
import mediaRouter from './media';
|
import mediaRouter from './media';
|
||||||
import sttRouter from './stt';
|
import sttRouter from './stt';
|
||||||
@ -16,6 +17,7 @@ app.use(cors({
|
|||||||
origin: 'http://localhost:5173',
|
origin: 'http://localhost:5173',
|
||||||
credentials: true
|
credentials: true
|
||||||
}));
|
}));
|
||||||
|
app.use(morgan('dev'));
|
||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
|
|
||||||
// API routes
|
// API routes
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user