Publishing Online
For public web deployment with SEO optimization and clean URLs:
Static Page Generation
Generate SEO-friendly static pages:
bash
npm run static-makeTo generate static pages and deploy in one step:
bash
npm run static-deployConfiguration in data/static-make.config.json:
- domain: Your public domain (e.g.,
"https://yourdomain.com") - required for sitemap generation whenindexSeo: true - indexSeo:
trueto allow search engine indexing,falseto addnoindexmeta tag (default:false) - entities: Which entity types to generate static pages for
- routes: Which routes to pre-generate
Note: This setup requires an Apache server with mod_rewrite enabled. Static generation creates SEO-optimized HTML files while maintaining the full SPA functionality.
Deployment
The deployment script node-scripts/deploy.ts automates the process of publishing your app to a remote server using rsync over SSH.
Usage:
bash
npm run deployHow it works:
- Reads deployment settings from
deploy.config.json(seedata-template/deploy.config.jsonfor an example). - Uses
rsyncto synchronize your local files to the remote server, with options for excluding files and deleting removed files. - Supports SSH key authentication and custom port configuration.
- Shows progress and errors directly in the terminal.
Configuration options:
host,port,username,privateKeyPath: SSH connection detailsremotePath: Destination folder on the serverignore: Array of file/folder patterns to excludesyncOption.delete: If true, files deleted locally are also deleted remotely
If no config is found, the script will prompt you to create one from the template (
data-template/deploy.config.json).
URL Rewriting
The included .htaccess file enables:
- Clean URLs:
/dataset/123instead of#/dataset/123 - Static page fallback: Serves pre-generated HTML when available
- HTTPS redirect: Automatic redirect to secure connection
- Caching: Optimized cache headers for assets