Generate Sudoku puzzles with arbitrary region sizes and clue counts using Donald Knuth's Algorithm X, exposed as a GraphQL API.
Go to file
Matt Low 7ac3e6ad06 Use worker threads for sudoku generation
Moves sudoku generation off of the main thread. Allows for multiple
generation requests (up to the number of physical CPU cores) to be
served in parallel. Uses the "physical-cpu-count" node package to
determine the numer of physical CPUs of the host.

Also introduces a timeout which causes too-difficult (or impossible)
generation requests to fail if they take more than 5 seconds to
complete. In effect soft-capping the complexity of generated puzzles.
2021-02-20 18:57:18 -07:00
src Use worker threads for sudoku generation 2021-02-20 18:57:18 -07:00
.dockerignore initial commit 2021-02-19 23:55:49 -07:00
.gitignore initial commit 2021-02-19 23:55:49 -07:00
Dockerfile initial commit 2021-02-19 23:55:49 -07:00
package-lock.json Use worker threads for sudoku generation 2021-02-20 18:57:18 -07:00
package.json Use worker threads for sudoku generation 2021-02-20 18:57:18 -07:00
README.md initial commit 2021-02-19 23:55:49 -07:00
tsconfig.json initial commit 2021-02-19 23:55:49 -07:00

BlueBlog API

A GraphQL blogging API.

Features

  • Username/Password JWT based authentication
  • Blog posts and client-side encrypted journal entries
  • Obfuscated IDs via hashids
  • Drafts for both of the above
  • Blog post edit history

Environment Variables:

# The secret used for JWT signatures creation and verification
SECRET=my-super-secret

# So hashids are unique
HASHIDS_SALT=salty

# PostgreSQL connection params
DB_HOST=localhost
DB_NAME=blueblog
DB_USER=blueblog
DB_PASSWORD=password
DB_PORT=5432

# Application startup PostgresSQL connection attempts & retry delay
DB_CONNECT_ATTEMPTS=6
DB_CONNECT_RETRY_DELAY=5

# Service responds at http://localhost:$LISTEN_PORT/graphql
LISTEN_PORT=4000