Source code for ljusa.re, a website displaying sunrise and sunset for cities around the world in a graph. The site is client-side only; all calculations are done by the browser.
To build the project, run the following command:
npm run prepack
This will generate all resources in the dist
folder. You can now copy these resources to your favorite web server, or
serve the site locally on your machine by running the following command:
npx serve dist
To execute the project's unit tests, run the following command:
npm run test
To format the code according to the project's style, run the following command:
npm run format
Assumes that the infrastructure is set up as below.
-
Set up AWS CLI credentials towards the infrastructure.
-
Define the URI of the S3 bucket as an environment variable:
export LJUSARE_BUCKET_URI="s3://mybucket"
- Finally, deploy:
npm run deploy
The infrastructure for the website roughly follows Cloudflare's Configuring an Amazon Web Services static site to use Cloudflare guide.
This project uses location data from GeoNames. See filterLocations
for how to update the data.