mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
14 lines
233 B
JavaScript
14 lines
233 B
JavaScript
import crypto from 'crypto'
|
|
|
|
export function get(key, defaultValue) {
|
|
const value = process.env[key]
|
|
if (value != null) {
|
|
return value
|
|
}
|
|
return defaultValue
|
|
}
|
|
|
|
export function genSecret() {
|
|
return crypto.randomUUID()
|
|
}
|