Personal website of Jesse Hattabaugh.
This is a Hypermedia-Driven Application AWS. The infrastructure is entirely defined in CDK using JavaScript.
Static assets like images, fonts, stylesheets, and client-side JavaScript are stored in /static
, and uploaded to S3.
Pages of this site are built by Lambda functions called by API Gateway. Each directory in /pages
contains an index.js
which is the main entry point for a corresponding route in API Gateway. Each index.js
file can export get()
, post()
, put()
, and del()
functions, which will be used to respond to requests for the GET
, POST
, PUT
, and DELETE
HTTP methods.
HTML is built using Marko templates. Shared templates and modules are stored in /lib
.
Copy the environment template and configure your certificate:
cp .env.example .env
Edit .env
and replace YOUR_CERTIFICATE_ID
with your actual certificate ID. You can find your certificate ID by running:
aws acm list-certificates --region us-east-1
The certificate ARN will be automatically constructed using your AWS account ID from your profile.
The URL and certificates are managed in AWS Route53.
This website is hosted at jessehattabaugh.com.
To deploy the production environment run npm run deploy
.
All responses from the production environment are cached in CloudFront.
The staging environment is staging.jessehattabaugh.com
To deploy the staging environment run npm run deploy:staging
.
The functionality of this site is verified in real browsers accessing real servers using Playwright.
To test the staging environment run npm test
.