Compare commits
3 Commits
baa6937bef
...
5be5ee5e40
Author | SHA1 | Date | |
---|---|---|---|
5be5ee5e40 | |||
878017ed8b | |||
856c72ea57 |
@ -4,8 +4,8 @@ let DEBUG = false;
|
|||||||
window.DEBUG = DEBUG;
|
window.DEBUG = DEBUG;
|
||||||
|
|
||||||
let SERVER_HOST;
|
let SERVER_HOST;
|
||||||
if (DEBUG) SERVER_HOST = 'localhost';
|
if (DEBUG) SERVER_HOST = 'http://localhost:50009';
|
||||||
else SERVER_HOST = 'a2s.su';
|
else SERVER_HOST = 'https://a2s.su';
|
||||||
window.SERVER_HOST = SERVER_HOST;
|
window.SERVER_HOST = SERVER_HOST;
|
||||||
|
|
||||||
/* main */
|
/* main */
|
||||||
@ -72,7 +72,7 @@ function get_from_api(callback, api_method = '', params = {}) {
|
|||||||
if (api_method == '') {
|
if (api_method == '') {
|
||||||
console.log('wrong method');
|
console.log('wrong method');
|
||||||
} else {
|
} else {
|
||||||
let url = `http://${SERVER_HOST}:50009/api/v1.0/${api_method}`;
|
let url = `${SERVER_HOST}/api/v1.0/${api_method}`;
|
||||||
let opts = {
|
let opts = {
|
||||||
method: 'get',
|
method: 'get',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -16,7 +16,7 @@ export function update_rev2(data) {
|
|||||||
// Обновление HP
|
// Обновление HP
|
||||||
const content_element = document.getElementById('rev2_emenies');
|
const content_element = document.getElementById('rev2_emenies');
|
||||||
data.enemies.forEach((emeny) => {
|
data.enemies.forEach((emeny) => {
|
||||||
enemy_data = emeny.split(' ');
|
let enemy_data = emeny.split(' ');
|
||||||
|
|
||||||
// Элемент с именем монстра
|
// Элемент с именем монстра
|
||||||
const enemy_name = document.createElement('p');
|
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