Ask coding questions

← Back to all posts
Use node.js repl tools (env, db, etc) in html, css, and js repls
Creatito1 (6)

Essentially, all I really want is to use databases and environment variable "secrets" tools inside html, css, and js repls. For example, I have a notes webpage in an html, css, and js repl that saves my notes to localStorage, the problem is, I want to be able to access these notes on every device by saving it to a replit database. I think I should mention that I know html, css, and js but I barely know node.js or even what it is :). I'm also wondering why these tools aren't in the html, css, and js repls, because unless I'm very confused, they are nearly the same thing right?

Answered by Coder100 (18930) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (18930)

You can't.
You can either link it up by using node.js, or you use only localStorage.

They are not the same thing. HTML is what you see on websites. Node.js interacts with what is supposed to be your computer itself, but replit this time!

Node.js is referred to as the backend, the thing that hosts the website, while HTML (dom js) is referred to as the frontend, the website.

ch1ck3n (2388)

they are not in html, css, js because they are static files and only ran by your browser. it cannot access the .env file.