Skip to content

Instantly share code, notes, and snippets.

import os from 'os'
import cp from 'child_process'
function getPlatform(): NodeJS.Platform {
// Detect WSL
if (os.platform() === 'linux' && os.release().includes('Microsoft')) {
return 'win32'
}
return os.platform()
}

In Windows:

scoop install mkcert
mkcert -install

In Linux: