Files
linux-odyssey/server/src/utils/env.js
T
wancat 88ed447573 fix: error handling
- Remove unnecessary try-catch block in createSession function
- Add error handling for missing session ID in socket.js
- Improve error handling in connectDB function
- Add error handling middleware for server errors
- Add default export for get function in env.js

Signed-off-by: wancat <wancat@wancat.cc>
2023-07-25 15:46:59 +08:00

9 lines
192 B
JavaScript

/* eslint-disable import/prefer-default-export */
export function get(key, defaultValue) {
const value = process.env[key]
if (value != null) {
return value
}
return defaultValue
}