support running as a standalone server for development

This commit is contained in:
Jesse D. McDonald 2020-05-02 16:08:54 -05:00
parent 8e0ce6f037
commit 0fc3787432
5 changed files with 10 additions and 6 deletions

3
.gitignore vendored
View File

@ -2,4 +2,5 @@ node_modules
.*.swp .*.swp
.*.swo .*.swo
*~ *~
dist/ public/
pacosako.db

View File

@ -1,6 +1,9 @@
'use strict'; 'use strict';
const API_BASE = `https://pacosako.jessemcdonald.info/api`; // Use the full URL to access production data from clients hosted on other servers.
//const API_BASE = `https://pacosako.jessemcdonald.info/api`;
const API_BASE = `/api`;
const SHORT_TIMEOUT = 5000/*ms*/; const SHORT_TIMEOUT = 5000/*ms*/;
const LONG_TIMEOUT = 90000/*ms*/; const LONG_TIMEOUT = 90000/*ms*/;

2
package-lock.json generated
View File

@ -7042,7 +7042,7 @@
}, },
"paco-sako-server": { "paco-sako-server": {
"version": "0.3.0", "version": "0.3.0",
"resolved": "git+https://jessemcdonald.info/gogs/nybble/paco_sako_server#902445c29fafdcfb4d98761418075649ac20bd82", "resolved": "git+https://jessemcdonald.info/gogs/nybble/paco_sako_server#45230dc112f7c8cab7e284df6ca8710d9e9efcc4",
"optional": true, "optional": true,
"requires": { "requires": {
"cors": "^2.8.5", "cors": "^2.8.5",

View File

@ -1,6 +1,6 @@
{ {
"name": "paco-sako", "name": "paco-sako",
"version": "0.4.0", "version": "0.4.1",
"description": "Online version of the Paco Ŝako chess variation", "description": "Online version of the Paco Ŝako chess variation",
"keywords": [ "keywords": [
"game", "game",
@ -24,7 +24,7 @@
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack", "build": "webpack",
"dev-build": "webpack --mode=development", "dev-build": "webpack --mode=development",
"deploy": "rsync --times --recursive --delete-after --verbose --progress dist/ pacosako-www@pacosako.jessemcdonald.info:/var/www/pacosako/" "deploy": "rsync --times --recursive --delete-after --verbose --progress public/ pacosako-www@pacosako.jessemcdonald.info:/var/www/pacosako/"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -13,7 +13,7 @@ module.exports = {
}, },
output: { output: {
filename: '[name].[contenthash].js', filename: '[name].[contenthash].js',
path: path.resolve(__dirname, 'dist'), path: path.resolve(__dirname, 'public'),
publicPath: '' publicPath: ''
}, },
module: { module: {