Progressive web-application for Geocloud 2 REST API (https://github.com/mapcentia/geocloud2)
- Check out the repository;
- Create
config.jsfromconfig.js.sample(fill out the API and Vidi URL); - Run
npm installto install all modules; - Create
.envfrom.env.productionand 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 startto run development version ornpm run start:productionto run production version; - (optional) If the application is installed in
/public/dashboardfolder, then the/public/.htaccesshas 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/.htaccessshould be copied to the web root directory.