Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fadi-george/advent-of-code-2024
bun typescript advent of code 2024
https://github.com/fadi-george/advent-of-code-2024
advent-of-code advent-of-code-2024 advent-of-code-2024-typescript aoc bun hono shadcn-ui tailwindcss tanstack-react-query tanstack-router typescript vite
Last synced: 15 days ago
JSON representation
bun typescript advent of code 2024
- Host: GitHub
- URL: https://github.com/fadi-george/advent-of-code-2024
- Owner: fadi-george
- Created: 2024-12-01T05:09:49.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-23T05:15:43.000Z (about 2 months ago)
- Last Synced: 2024-12-23T05:28:29.049Z (about 2 months ago)
- Topics: advent-of-code, advent-of-code-2024, advent-of-code-2024-typescript, aoc, bun, hono, shadcn-ui, tailwindcss, tanstack-react-query, tanstack-router, typescript, vite
- Language: TypeScript
- Homepage:
- Size: 935 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code 2024
Solutions written in Typescript.
![]()
## Setup
Install Bun: https://bun.sh/docs/installation
Create an `.env` file in the root folder. Set the value of `AOC_SESSION_COOKIE` to `'session='`.
You can grab your session cookie by looking at your headers in the network log on adventofcode.com.Run `bun install` for each folder: `aoc`, `frontend`, and `server`.
## Running
### CLI
Can run individual files located in the `aoc` folder by passing in the `FILE`, `YEAR`, and `DAY` environment variables. E.g.
Create a `txt` file in the `aoc/2024/day` folder. If the file is named `input.txt`, then you can run the file with:
```
FILE=input YEAR=2024 DAY=1 bun aoc/index.ts
```Bun version: 1.1.36 is recommended for debugging.
Can run the `Bun Debug AoC` launch config to run the script with debugging enabled.
This will require setting the `FILE`, `YEAR`, and `DAY` in a `.env` file in the root folder. E.g.```
FILE=sample.txt
YEAR=2024
DAY=1
```### Web App + Server
Run the hono backend server:
```
cd server;
npm run dev;
```Run the frontend dev server:
```
cd frontend;
npm run dev;
```Can navigate to different days and put in custom inputs.