Welcome back! This is part IV of a series I’m writing on my approach to creating a cribbage platform using Firebase Realtime database and an express server. In the last piece, I showed my approach to dynamically creating shareable urls using Node’s fs module and dynamic routing. In this piece, I will cover some cleanup from that process to ensure that the server’s file structure does not get too out of hand.

First I’ll cover how to delete the unique Firebase node after the game is finished. …


This is part 3 in a series about making an online cribbage game using the Firebase Realtime Database. In part I, I set up a Firebase Database and created a virtual deck of cards with a shuffle method. In part II, I covered the rule of using firebase events to change the database and having the database control the DOM. In Part III I will start to show my approach to making a server that will create a unique and shareable url that allows people to play cribbage with another person no matter where they are in the world!

In this article I will create a Node server running Express to listen for and handle requests, and also use Node’s file system module to create and delete some unique game files. For the views, I will use ejs to translate my current html into a more dynamic format that accepts variables. …


This is a continuation of a previous article that showed the basics of an approach I’m trying with the Firebase realtime database to create a webpage that lets me play cribbage with friends and family. It’s my hope that this page will allow me to stay close with people I haven’t been able to see in person for most of 2020, and learning a new skill is always exciting, so let’s go!

SIDE NOTE: The full rules for cribbage can be found here. Be warned, the rules are kind of intricate but they are fairly intuitive. …


Image for post
Image for post

The Firebase Realtime Database is one of my favorite things on the internet. You can watch in real time as people interact with your code, and the screen lights up as the data changes. After learning about Firebase, I had an idea: could I use it to make a card game to play remotely with someone else? I decided to challenge myself and create a platform that would allow me to play cribbage over the internet. My parents first taught me cribbage when I was very young to help me learn basic math. It’s fun, but has a lot of rules. …

About

Myles Tyrer

I’m a web developer focusing on interactive projects using React and Nodejs.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store