Website for my band Nasty Snacks from Chicago, IL
Built using the Astro framework, hosted on Netlify, pulling content from Sanity.
Integration with the Discord Snackbot, allowing us to easily update our upcoming shows via Discord slash commands.
First, clone the repo:
git clone https://github.com/Scott2bReal/nasty-snacks
This is a pnpm
project. If you don't have pnpm
installed already, you can
install it by following the instructions here.
We are using the workspaces feature of pnpm
to manage dependencies for both
the Astro site and the Sanity Studio.
Once you have pnpm
installed, you can run the following command from the
project root:
pnpm install
This will install all dependencies for both the astro
and sanity
projects.
To run the project, you'll need to run two commands in separate terminals:
Starts the local dev server for the Astro site (default port is 4321
)
pnpm astro:dev
Starts a local server for the Sanity Studio (default port is 3333
)
pnpm sanity:dev
The Astro app needs some environment variables to function properly. There is a
./astro/.env.example
file which contains all of the environment variable
keys. You should create a separate .env
by copying the example file (from the
project root):
cp ./astro/.env.example ./astro/.env
You can then hit me up for the values for each of the keys ;)
The package.json
file in the root directory of the project has several
helpful commands. For example:
pnpm format
- Runsprettier --check
on the project, displaying any files that need to be formatted.pnpm lint
- Runseslint
on the project, displaying any linting errors.
There are :fix
versions of both of these commands which will attempt to fix any errors.