/mean-card-game

An engine for playing card games in the browser.

Primary LanguageTypeScriptMIT LicenseMIT

Intention

This project will become an app for hosting playing card games in the browser. I am using the wonderful SocketIO Typescript Chat project below as a starting point. The rest of the info in this file regards that project; more info regarding the card game engine as it's built.

Progress

Many features are functional; more are being added. This app is now being hosted on Railway!

Card-game Client

You may have to poke the server and wait a moment, since free heroku dynos tend to fall asleep. Note there is literally no web front-end, so this call will return an error (cannot GET /), but it will wake the server up.

I'm not on Heroku anymore, I have no idea if this is true for Railway.

Card-game Server

GitHub stars Tweet

Blog Post

Read the blog post with details about this project: Real Time Apps with TypeScript: Integrating Web Sockets, Node & Angular

Live Demo

Try live demo: https://typescript-chat.firebaseapp.com

Support this project

  • Star GitHub repository ⭐
  • Create pull requests, submit bugs or suggest new features
  • Follow updates on Twitter or Github

Running Server and Client locally

Prerequisites

First, ensure you have the following installed:

  1. NodeJS - Download and Install latest version of Node: NodeJS
  2. Git - Download and Install Git
  3. Angular CLI - Install Command Line Interface for Angular https://cli.angular.io/

After that, use Git bash to run all commands if you are on Windows platform.

Clone repository

In order to start the project use:

$ git clone https://github.com/luixaviles/socket-io-typescript-chat.git
$ cd socket-io-typescript-chat

Run Server

To run server locally, just install dependencies and run tsc to create a build:

$ cd server
$ npm install
$ npm run build
$ npm start

The socket.io server will be running on port 8080

Run Angular Client

Open other command line window and run following commands:

$ cd client
$ npm install
$ ng serve

Now open your browser in following URL: http://localhost:4200

License

MIT