127.0.0.1 my-app
server {
listen 80;
server_name my-app;
location ^~ / {
proxy_pass http://localhost:81/;
}
location ^~ /api/ {
proxy_pass http://localhost:5000/api/;
}
}
http://my-app
и к API в приложении как к http://my-app/api
. var old_element = document.getElementById("btn");
var new_element = old_element.cloneNode(true);
old_element.parentNode.replaceChild(new_element, old_element);
2. Вешаете свой слушатель.handleChange = e => {
// handler
};
handleChangeDebounced = debounce(handleChange, 300);
<Input onChange={this.handleChangeDebounced} />
value.replace(/\n/g, '<br/>');
const resolve = () => console.log('resolve');
const reject = () => console.log('reject');
const promise2 = () => new Promise((resolve, reject) => {
console.log ('promise2');
const zn = prompt ('digit');
if (zn > 9) {
resolve()
}
else {
reject();
}
});
const myInnerServerTalk = () => new Promise((resolve, reject) => {
console.log (' myInnerServerTalk');
const zn = prompt ('digit');
if (zn > 9) {
resolve()
}
else {
reject();
}
});
myInnerServerTalk().then(resolve).catch(reject);
var x = true;
x = !x;
console.log(x); // false