kern / filepizza

:pizza: Peer-to-peer file transfers in your browser
https://file.pizza
Other
4.36k stars 328 forks source link

"Error: ENOENT: no such file or directory, open" when I add HTTPS_KEY #132

Open meisa233 opened 3 years ago

meisa233 commented 3 years ago
Exiting due to uncaught exception!
Error: ENOENT: no such file or directory, open '/home/meisa/server.key'
    at Object.openSync (fs.js:461:3)
    at Object.readFileSync (fs.js:363:35)
    at Object.<anonymous> (/dist/server.js:90:13)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/dist/index.js:25:18)

I use the following command to generate my key and .crt file.

 sudo openssl req -new -nodes -sha256 -newkey rsa:2048 -keyout server.key -out server.cs
 sudo openssl req -new -x509 -key server.key -out server.crt -days 3650