Progressive web-application for Geocloud 2 REST API (https://github.com/mapcentia/geocloud2)
- Check out the repository;
- Create
config.js
fromconfig.js.sample
(fill out the API and Vidi URL); - Run
npm install
to install all modules; - Create
.env
from.env.production
and specify theWEBPACK_PUBLIC_PATH
(/
if the application is served fromhttps://example.com/
;/some/folder/
if the application is served fromhttps://example.com/some/folder/
; - Run
npm start
to run development version ornpm run start:production
to run production version; - (optional) If the application is installed in
/public/dashboard
folder, then the/public/.htaccess
has to be populated with following;
...
<IfModule mod_rewrite.c>
RewriteEngine On
# Rewrite rules for React app, located in dashboard subdirectory - return
# the index.html unless the requested file / directory exists
RewriteRule ^dashboard/index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^dashboard/(.*) dashboard/index.html [L]
...
- (optional) If the application is served from web root (accessible via
https://example.com/
), thenapp/.htaccess
should be copied to the web root directory.