This project uses the sveltekit framework and sst version 2 to build and deploy to AWS a fullstack applications allowing for the search and cataloging of geospatial data.
shell.nix file at the root of the repo to automatically setup your environment.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 the secret for OIDC_CLIENT_SECRET. Add this for each stage you want to deploy or work on locally. e.g. npx sst secrets set OIDC_CLIENT_SECRET <secret> --stage <your-stage-name>
enshure your login and logout url's are configured correctly with your Single Sign-on(SSO) provider.
For local development run npm run dev, open a new terminal, run cd packages/web-app/ and npm run dev. Enter the name of your local stage if asked.
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 secret for OIDC_CLIENT_SECRET. Add this for each stage you want to deploy or work on locally. e.g. npx sst secrets set OIDC_CLIENT_SECRET <secret> --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 deploy using one of the scripts from the package.json: npm run deploy-<stage>.
Note: If you wish to deploy to a stage not specified in the package.json, you can use the following command. npx sst deploy --stage <yourStageName>.