Is there anyway that I can access a js file in both the nodejs server and client?
Hi! For client, you can use:
fetch(url)
.then(e => e.text())
.then(e => console.log(e))
For server, you can use fs
Is there anyway that I can access a js file in both the nodejs server and client?
Hi! For client, you can use:
fetch(url)
.then(e => e.text())
.then(e => console.log(e))
For server, you can use fs