https://github.com/larsbergqvist/sudoku-app
A Sudoku app implemented with React/Redux and TypeScript
https://github.com/larsbergqvist/sudoku-app
react redux typescript
Last synced: 2 months ago
JSON representation
A Sudoku app implemented with React/Redux and TypeScript
- Host: GitHub
- URL: https://github.com/larsbergqvist/sudoku-app
- Owner: LarsBergqvist
- License: mit
- Created: 2025-02-10T17:22:00.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-02-25T18:13:37.000Z (8 months ago)
- Last Synced: 2025-02-25T18:41:59.722Z (8 months ago)
- Topics: react, redux, typescript
- Language: TypeScript
- Homepage: https://larsbergqvist.github.io/sudoku-app/
- Size: 957 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sudoku-app

## Project Setup
```bash
git clone https://github.com/LarsBergqvist/sudoku-app.git
cd sudoku-app
npm install
npm run dev
```## Mock API
By default, the app uses a mock API to fetch a random sudoku puzzle with a specified difficulty level from a predefined set. The mock data is located in the `src/mocks/sudokuData.ts` file.
## Use the real API
To use the real API that generates new random puzzles for every request, you need to clone the sudoku-puzzler api (C#, NET8) and run it locally:
On mac/linux:
```bash
git clone https://github.com/LarsBergqvist/sudoku-puzzler.git
cd sudoku-puzzler
dotnet build
export ASPNETCORE_ENVIRONMENT=Development
dotnet run --project Sudoku.Web/Sudoku.Web.csproj --http_ports "5100" --https_ports "5400"
```On Windows:
```bash
git clone https://github.com/LarsBergqvist/sudoku-puzzler.git
cd sudoku-puzzler
dotnet build
set ASPNETCORE_ENVIRONMENT=Development
dotnet run --project Sudoku.Web/Sudoku.Web.csproj --http_ports "5100" --https_ports "5400"
```Then, modify `.env.development` in the sudoku-app project to point to the local API and set VITE_USE_MOCK_API to false.
```bash
VITE_USE_MOCK_API=false
VITE_API_URL='https://localhost:5400'
```