Compare commits
3 Commits
baa6937bef
...
5be5ee5e40
Author | SHA1 | Date | |
---|---|---|---|
5be5ee5e40 | |||
878017ed8b | |||
856c72ea57 |
@ -4,8 +4,8 @@ let DEBUG = false;
|
||||
window.DEBUG = DEBUG;
|
||||
|
||||
let SERVER_HOST;
|
||||
if (DEBUG) SERVER_HOST = 'localhost';
|
||||
else SERVER_HOST = 'a2s.su';
|
||||
if (DEBUG) SERVER_HOST = 'http://localhost:50009';
|
||||
else SERVER_HOST = 'https://a2s.su';
|
||||
window.SERVER_HOST = SERVER_HOST;
|
||||
|
||||
/* main */
|
||||
@ -72,7 +72,7 @@ function get_from_api(callback, api_method = '', params = {}) {
|
||||
if (api_method == '') {
|
||||
console.log('wrong method');
|
||||
} else {
|
||||
let url = `http://${SERVER_HOST}:50009/api/v1.0/${api_method}`;
|
||||
let url = `${SERVER_HOST}/api/v1.0/${api_method}`;
|
||||
let opts = {
|
||||
method: 'get',
|
||||
headers: {
|
||||
|
@ -16,7 +16,7 @@ export function update_rev2(data) {
|
||||
// Обновление HP
|
||||
const content_element = document.getElementById('rev2_emenies');
|
||||
data.enemies.forEach((emeny) => {
|
||||
enemy_data = emeny.split(' ');
|
||||
let enemy_data = emeny.split(' ');
|
||||
|
||||
// Элемент с именем монстра
|
||||
const enemy_name = document.createElement('p');
|
||||
|
15
server/nginx.conf
Normal file
15
server/nginx.conf
Normal file
@ -0,0 +1,15 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
|
||||
server_name a2s.su;
|
||||
|
||||
ssl_certificate fullchain.pem;
|
||||
ssl_certificate_key privkey.pem;
|
||||
|
||||
root /home/alex/Sites/a2s.su/www;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:50009;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user