Code Monkey home page Code Monkey logo

cards-against-humanity's Introduction

cards-against-humanity

Cards Against Humanity website written in Golang.

(WIP) Live on cards.djpiper28.co.uk.

Quality Gate Status Coverage Go e2e

Dev Stuff

You can run the software via Docker Compose, or build it yourself. You can then go to http://localhost:8000

docker-compose up

Building

Deps

  • pnpm
  • Go
  • GNU Make
  • Docker
  • Docker Compose

To build/test all parts of the system use the below commands.

# Build and execute
make -j

./backend
# or .\backend.exe if you use WinDoze

# Format the code
make fmt -j

# Run the tests
make test -j

# Run the benchmarks
make bench -j

Backend

The backend is in Go and uses Gin and Gorilla.

The server will start on http://localhost:8080, Prometheus metrics can be found at /metrics (server stats), and game stats on /game-metrics. This setup is jank lol, don't question it though. The swagger docs can be found on http://localhost:8080/swagger/index.html.

Debugging

To debug you can use gdb (of lldb if you are on mac), mac and windows people need to use their debugger I guess.

Frontend

The frontend is in TS and uses SolidJS, Vite, Vitest, and Storybook. You should use the Makefile for building make -j, and pnpm dev for a dev server.

The server will start on http://localhost:3000, currently the backend is set to http://localhost:8080

Local Development

Due to CORS errors, you need to setup a proxy, see devProxy for a local development proxy server.

Following this you need to run the proxy, backend, and the frontend dev server, then go to the proxies: http://localhost:3255.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.