nginx setup and make
This commit is contained in:
+2
-2
@@ -4,9 +4,9 @@
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "parcel watch index.html --out-dir /var/lib/mnml/public",
|
||||
"start": "parcel watch index.html --out-dir /var/lib/mnml/public/dist",
|
||||
"anims": "parcel animations.html --host 0.0.0.0 --port 40080 --no-source-maps",
|
||||
"build": "parcel build index.html --out-dir /var/lib/mnml/public",
|
||||
"build": "parcel build index.html --out-dir /var/lib/mnml/public/dist",
|
||||
"scss": "node-sass --watch assets/scss -o assets/styles",
|
||||
"lint": "eslint --fix --ext .jsx src/",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
|
||||
@@ -7,7 +7,7 @@ const actions = require('./actions');
|
||||
const { TIMES } = require('./constants');
|
||||
const { getCombatSequence } = require('./utils');
|
||||
|
||||
const SOCKET_URL = process.env.NODE_ENV === 'production' ? 'wss://mnml.gg/api/ws' : 'ws://localhost:40000/api/ws';
|
||||
const SOCKET_URL = process.env.NODE_ENV === 'production' ? 'wss://mnml.gg/api/ws' : 'ws://localhost/api/ws';
|
||||
|
||||
function createSocket(store) {
|
||||
let ws = null;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const toast = require('izitoast');
|
||||
const cbor = require('borc');
|
||||
|
||||
const SOCKET_URL = process.env.NODE_ENV === 'production' ? 'wss://mnml.gg/api/ws' : 'ws://localhost:40000/api/ws';
|
||||
const SOCKET_URL = process.env.NODE_ENV === 'production' ? 'wss://mnml.gg/api/ws' : 'ws://localhost/api/ws';
|
||||
|
||||
function errorToast(err) {
|
||||
console.error(err);
|
||||
|
||||
@@ -352,11 +352,9 @@ const removeTier = skill => {
|
||||
return skill;
|
||||
};
|
||||
|
||||
|
||||
const SERVER = process.env.NODE_ENV === 'production' ? '/api/' : 'http://localhost:40000/api';
|
||||
function postData(url = '/', data = {}) {
|
||||
// Default options are marked with *
|
||||
return fetch(`${SERVER}${url}`, {
|
||||
return fetch(`/api${url}`, {
|
||||
method: 'POST', // *GET, POST, PUT, DELETE, etc.
|
||||
// mode: 'no-cors', // no-cors, cors, *same-origin
|
||||
cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached
|
||||
@@ -379,7 +377,6 @@ module.exports = {
|
||||
getCombatSequence,
|
||||
getCombatText,
|
||||
postData,
|
||||
SERVER,
|
||||
NULL_UUID,
|
||||
STATS,
|
||||
COLOURS,
|
||||
|
||||
Reference in New Issue
Block a user