This sample shows how to use a Weather Dark Sky REST API using ScaleDynamics WarpJS SDK, in particular we are loading weather forecast at a specific location.
For more info about the API, refer to https://darksky.net/dev/docs
👉 Try a live demo
- Clone the project
- Go to the
warp-samples/darkskydirectory - Run the following commands:
# install deps
$ npm install
# login to ScaleDynamics
$ npx warp login- Open a free account on https://darksky.net/dev, and get your API key
- Open the
server/index.jsfile - Update the
DARKSKY_API_KEYvalue with yours
# run a dev server
$ npm run dev
# build and deploy to production
$ npm run build
$ npm run deploy