Currently running at https://freeflightwx.com/new/
Install the required npm packages with:
npm installIf you later have trouble with e.g. npm run build then try changing your node version.
I do this with node version manager (nvm):
nvm install --lts
nvm use --ltsStart the development server with:
npm run devNow navigate a browser to http://localhost:5173 (or whichever port npm run dev says to use).
npm run buildThe web application is now available in the build/ folder.
Make sure you have built first (see above).
The server uses FTP, so I use lftp like this (changing <username>, <password> and <host> to the correct values:
lftp :~> open ftp://<username>:<password>@<host>
lftp :~> set ftp:ssl-protect-data true
lftp <username>@<host>:/> cd public_html/new
lftp freeflightwx@s05ae.syd6.hostingplatform.net.au:/public_html/new> lcd build
lftp freeflightwx@s05ae.syd6.hostingplatform.net.au:/public_html/new> mirror --reverse --delete --use-cache --verbose --no-perms --no-umask --parallel=2
Note that if you run a new build and still have lftp open you will need to run lcd ../build before running the mirror command again.
Also be very certain that you are in public_html/new, otherwise you will wipe some other directory!
Until I figure out how to automate this, there are several places you need to change:
- Add your site in
src/freeflightwx-sites.ts(copy and change one of the others), and add it toallSitesin the same file. - Add a mapping from the site's path to its data table in
$data_tablesinstatic/fetch.php. - Add its path to the list of entry points in
svelte.config.js. - (optional) Add it to
src/routes/+page.svelteto include it on the home page.
The static/export_sites.php script needs to be run on the server, like this (assuming it has been uploaded by ftp):
curl -o src/freeflightwx-sites-autogen.ts https://freeflightwx.com/new/export_sites.phpAfter you have added the individual sites:
- Add your group in
src/freeflightwx-sites.ts(copy and change one of the others), and add it toallGroupsin the same file. - Add its path to the list of entry points in
svelte.config.js. - (optional) Add it to
src/routes/+page.svelteto include it on the home page.