Node.JS Replit Database Not Working
Whenever i use the IDE terminal, the project works just fine, but when i try to input the address in the address bar, i get this error:
at getNodeRequestOptions (/home/runner/txqkaiacxo9/node_modules/node-fetch/lib/index.js:1305:9) at /home/runner/txqkaiacxo9/node_modules/node-fetch/lib/index.js:1410:19 at new Promise (<anonymous>) at fetch (/home/runner/txqkaiacxo9/node_modules/node-fetch/lib/index.js:1407:9) at Client.get (/home/runner/txqkaiacxo9/node_modules/@replit/database/index.js:20:18) at /home/runner/txqkaiacxo9/index.js:22:12 at Interface._onLine (readline.js:327:5) at Interface._line (readline.js:658:8) at Interface._ttyWrite (readline.js:1003:14) at ReadStream.onkeypress (readline.js:205:10) (node:44) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:44) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
Answered by Coder100 (17111) [earned 5 cycles]
I got it!
I got it!
What happened is that this is a terminal application. This means 2 things:
- repl.it DB does not work (yet, hopefully)
.envfiles and secret keys remain too secret and can't even be accessed.