Skip to content

sigurdskatvedt/gameoflife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Game of Life, Leaflet

Access

The rule administration panel is hosted here and the Game of Life itself is hosted here.

What's inside?

This turborepo uses Yarn as a package manager. It includes the following packages/apps:

Apps and Packages

  • gameoflife: a Leaflet application providing a simulation of the popular Game of life, with the possibility to use different rulesets.
  • webservice: an Apollo Server GraphQL-server for fetching rule for said application, using a interface for adding new rules provided by Next.js
  • ui: a stub React component library
  • eslint-config-custom: eslint configurations (includes eslint-config-next and eslint-config-prettier)
  • tsconfig: tsconfig.jsons used throughout the monorepo

Utilities

Dependencies

Install dependencies with

yarn install

Prisma Setup

You need a working Postgres database and to connect it to Prisma. Add a .env and with, for example,

DATABASE_URL="postgresql://postgres:postgres@localhost:5432/webserver"
NEXT_PUBLIC_API_URL="http://localhost:3000/api"

Documentation for the Postgres URI can be found here After setting it up, run

yarn prisma db push
yarn prisma db seed
yarn prisma migrate

Developement

While developing, run the developement build with the following command:

yarn dev

Build

To build all apps and packages, run the following command:

yarn build