This project uses the sveltekit framework and sst to build and deploy to AWS a fullstack applications allowing for the search and cataloging of geospatial data.
git clone <Your-forked-repo-url>node -vnpm -vnvm -vsudo apt-get install curlcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bashcommand -v nvm Note: If successful 'nvm' will print. If nothing happens or an error is received, close and open a new terminal.nvm install --lts Note: A nodejs version that matches the .nvmrc may be required instead of the latest version. You can adjust the nvm install command by specifying the node version like this: nvm install 18.20.8. Just replace the number with the correct version.node -v and npm -v.nvmrc file. See nvm.cd app.geo.ca-v2 Note: the name of your directory may differ based on the name of your forked repo.npm i/packages/web-app/ directory using cd packages/web-appnpm iAfter following the setup, start a development server with these steps:
setup your aws credentials. documentation
Create a .env file for your stage. You can do this by copying the .env.dev but change ‘dev’ to the name of your stage.
Set secrets for OIDC_CLIENT_SECRET and GEOCORE_API_DOMAIN. Add this for each stage you want to deploy or work on locally. e.g. npx sst secret set GEOCORE_API_DOMAIN https://geocore.api.geo.ca --stage <your-stage-name>
enshure your login and logout url's are configured correctly in aws cognito.
For local development run npm run dev from the repository root. SST v4 starts the multiplexer and frontend together.
For deployment, run npx sst deploy --stage <yourStageName>. You will need to deploy your environment in order to build any AWS resources like buckets and tables.
now run the steps under ## Importing Data.
setup your aws credentials for the desired environment. documentation
Create a .env file for your stage. You can do this by copying the .env.dev but change ‘dev’ to the name of your stage.
Set secrets for OIDC_CLIENT_SECRET and GEOCORE_API_DOMAIN. Add this for each stage you want to deploy or work on locally. e.g. npx sst secret set GEOCORE_API_DOMAIN https://geocore.api.geo.ca --stage <your-stage-name>
from / run npm i.
from /packages/web-app/ run npm i. A nodejs version that matches the .nvmrc may be required.
enshure your login and logout url's are configured correctly in aws cognito.
deploy from the root of the repository: npx sst deploy --stage <yourStageName>
Do the following while your project's server is running:
<your-stage-name>-<your-project-name>-site-hnapbucket<some-other-random-characters>geocorehnapdata-samples folder.<your-bucket-name>/geojson. Note that any record not imported this way will return a 404 when viewed.