1
Fork 0
This repository has been archived on 2025-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
astro-authorizer-template/README.md
2024-04-03 21:49:17 -04:00

59 lines
No EOL
1.3 KiB
Markdown

# Astro + Authorizer Template
![Banner](./banner.png)
## Setup
Clone the repository to your machine:
```bash
git clone https://sudovanilla.com/code/Korbs/astro-authorizer-template
```
Install packages with your preferred package manager:
```
# NPM
npm install
# Yarn
yarn
# Bun
bun install
# PNPM
pnpm install
```
Setup the `.env` file for your Authorizer instance:
```env
authorizerURL='https://auth.example.com'
redirectURL='/'
clientID='00000000-0000-0000-0000-000000000000'
```
Run it:
```bash
npm start
```
The site should be running on http://localhost:4321.
## Server-Side Rendering
This template is built to run on the server side, not client. So don't run this is a static site on your server or else where.
Astro has ways to run the site in SSR:
- [Docker](https://docs.astro.build/en/recipes/docker/#ssr)
- [Node](https://docs.astro.build/en/guides/integrations-guide/node/)
- [Cloudflare Pages](https://docs.astro.build/en/guides/integrations-guide/cloudflare/)
- [Netlify](https://docs.astro.build/en/guides/integrations-guide/netlify/)
- [Vercel](https://docs.astro.build/en/guides/integrations-guide/vercel/)
A `Dockerfile` has been provided for this repo, which can be built using:
```bash
docker build -t astro-authorizer-demo .
```
Then running it with:
```
docker compose up -d
```
The site should be running on http://localhost:7000.