Skip to content

cdleveille/copterjs

Repository files navigation

copterjs

Modern remake of the classic addicting flash game.

Play on fly.io: copterjs.fly.dev

screenshot

Technologies

Local Setup

Install prerequisites:

Optional (for database-related development only):

Set up dev environment:

  • Clone repo and open root folder in VS Code.
  • Install recommended VS Code extensions to conform to project linting/formatting config:
  • Run yarn in the terminal to install package dependencies.
  • Create and populate a .env file in the root folder based on the .env.example file, which contains default environment variable values for a dev environment.
  • Optionally switch the USE_DB environment variable to false and skip the "Set up dev database" instructions below if there is no need for a dev database.

Set up dev database (only required if USE_DB=true in the .env file):

  • Open Docker Desktop and leave it running in the background.
  • In VS Code, right-click on /.copterjs-dev-container/docker-compose.yml and select Compose Up.

Launch:

  • Run yarn dev to concurrently run the server via ts-node-dev and the client via webpack in watch mode. This will cause either to automatically restart whenever a change is made to any of their respective source code files. The client will be accessible on localhost:3000.
  • Alternatively, start the debug launch configuration in VS Code (press F5), which essentially runs yarn dev with the VS Code debugger attached to the server. The client can be debugged in the browser developer tools via source maps.