This is an example mini project demonstrating the amazingness that is Astro + SST.
- Clone this repo.
- Run
pnpm i
(Don't have pnpm? Install it!) - Run
pnpm sst:dev
and give it a few minutes to deploy. When it completes, you should see something like "Deployed" followed bybeerGptApiUrl: https://xx.lambda-url.us-east-1.on.aws
. - Kill the SST process.
- Copy
.env.dev.local.dist
to.env.dev.local
and drop your OpenAI API key in there as well as the API URL provided in the SST deployment output (that'sPUBLIC_BEER_GPT_API_URL
). If you don't have access to the GPT-4 model yet, change that as well. - Run
pnpm sst:dev
again. - Run
pnpm dev
in another tab/window (this is for the Astro site). - Go to
http://localhost:3000
and have fun!