Retrieve real-time data from your Nordic Semiconductor Development Kit within seconds.
Install the dependencies:
npm ci aws location create-key \
--region eu-west-1 \
--key-name hello.nrfcloud.com \
--description "Map tiles for the hello.nrfcloud.com web app" \
--no-expiry \
--restrictions '{"AllowActions":["geo-maps:GetTile","geo-maps:GetStaticMap"],"AllowResources":["arn:aws:geo-maps:eu-west-1::provide
r/default"],"AllowReferers":["https://hello.nrfcloud.com/*","http://localhost:*/*"]}'Export the map settings as the environment variables MAP_REGION and
MAP_API_KEY before running it.
npm startEnd-to-end tests are run completely without a backend using Vite's built-in dev server to serve the data.
Note: It's currently not possible to run test for multiple browsers in parallel since the
webServer> cannot be defined per project, and there is a state in the backend mock server that gets manipulated by the tests. So by default only thechromeproject is run
npm run test:e2enpx playwright codegenPWDEBUG=1 npx playwright test e2e-tests/See ./e2e-tests/README.e2e-server.md
- register domain name, export as
DOMAIN_NAME - create certificate in
us-east-1region, export asCERTIFICATE_ID
npx cdk bootstrap
npx cdk deploy --allCreate a GitHub environment production.
Store the registry endpoint as a GitHub Action variable:
gh variable set REGISTRY_ENDPOINT --env production --body "<registry endpoint>"
# If using a custom domain name
gh variable set DOMAIN_NAME --env production --body "<domain name>"
gh variable set MAP_REGION --env production --body "<mapRegion>"
gh variable set MAP_API_KEY --env production --body "<apiKey>"Store the role used for continuous deployment as a secret:
CD_ROLE_ARN=`aws cloudformation describe-stacks --stack-name ${STACK_NAME:-hello-nrfcloud-web} | jq -r '.Stacks[0].Outputs[] | select(.OutputKey == "gitHubCdRoleArn") | .OutputValue'`
gh secret set AWS_ROLE --env production --body "${CD_ROLE_ARN}"Store the stack name and the region as a variable:
gh variable set STACK_NAME --env production --body "${STACK_NAME:-hello-nrfcloud-web}"
gh variable set AWS_REGION --env production --body "eu-west-1"Store the map settings as variables:
# Make sure that the `ci` environment exists in this repo
gh variable set MAP_REGION --env ci --body "<mapRegion>"
gh variable set MAP_API_KEY --env ci --body "<apiKey>"This project requires Node.js >=20.0.0 and npm >=12.0.2 <13 (enforced via
check-node-version on npm install and npm ci).
The check is skipped during npm publish and npm pack, because
semantic-release bundles its own npm (@semantic-release/npm depends on
npm@^11.6.2) and runs the publish with that version rather than the one
installed in CI.