Skip to content

Commit

Permalink
apply morgan just in dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
abdessamadpas committed Aug 22, 2023
1 parent d75582b commit 51625b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ app.use(express.json());
app.use(express.static('public'))
app.use(helmet());
app.use(cors());
app.use(morgan('tiny'));

app.get('env') === 'development' && app.use(morgan('tiny'));

// * connect to socket expense
app.use('/sockets', expenseSocket);
Expand Down

0 comments on commit 51625b2

Please sign in to comment.