This project was generated with the Dojo CLI & Dojo CLI create app command.
This app is a demo for a fun and not serious conference talk about JavaScript and tech debates and memes (e.g. tabs vs. spaces, classes vs. not), with the ultimate debate being whether we prefer cats or dogs.
It has been presented at HalfStack 2018 and the November 2018 Phoenix TypeScript meetup. Here are the slides for the Phoenix TypeScript presentation.
The Cats vs. Dogs app leverages modern Dojo, Web Animation, WebAudio, and more for this simple demo app.
This repository contains both the client and server for cats vs dogs located in their respective directories. The root directory of this project provides scripts applicable to the entire project.
- run
npm install
to install all dependencies - to build the client run
npm run build
- to start the server run
npm run start
- open http://localhost:3000
CatsvsDogs can be deployed to Now using npm run deploy:now
. You will need to have an account and be logged in using the now CLI.
The client can also be deployed to Github pages using npm run deploy:gh
Build the image
docker build -t "catsvsdogs" .
Run the image
docker run -p 3000 --name versus catsvsdogs
Debug the image
docker exec -it versus /bin/bash
The client, located under the client
directory, is built using Dojo CLI.
Then run dojo build --mode dist
(the mode
option defaults to dist
) to create a production build for the project. The built artifacts will be stored in the output/dist
directory.
Run dojo build --mode dev
to create a development build for the project. The built artifacts will be stored in the output/dev
directory.
Run dojo build --mode dev --watch memory --serve
to create an in memory development build and start a development server with hot reload. By default the server runs on port 9999
, navigate to http://localhost:9999/
.
To change the port of the development use the --port
option.
To get help for these commands and more, run dojo
on the command line.
The server is located under the server
directory and uses NestJS to provide APIs to the client.
The server uses ts-node
and does not require a build to start. Use npm run start
to start the server.
- Cat & Dog created by Terdpongvector
- Meow sound created by Tuberatanka
- Bark sound by Soundsnap
- Yoda Image source
- Spock image by Zombie Daisuke
- Yoda Audio from Realm of Darkness soundboard
- Starfleet logo Wikipedia
- Rebel logo Wikipedia