Skip to content

and07/url2data

Repository files navigation

1. Just Deploy the same on Heroku

Deploy

2. Paste PORT to Heroku

Go to heroku dashboard, go to "Setting" -> "Config Variables".

  • Add "Config Vars"
  • Name -> "PORT"
  • Value use 80.

Use

const addScript = (src) => {
  var elem = document.createElement("script");
  elem.src = src;
  document.head.appendChild(elem);
}

const getData = (data) => {
  conosle.log(data)
}

addScript("https://APP_ADDRESS.herokuapp.com/data?url=http://habr.ru&callback=getData")