chrome. I
credentials.js
module.exports{
api_key = "1234",
consumer_secret = "xyz"
}
script.js
var credentials = require("./credentials");
console.log(credentials.api_key);
console.log(credentials.consumer_secret);
This gives an error
object api_key not found
. How do I fix this?
you missed an equal sign and Common modules only work in Node environment iirc
Обсуждают сегодня