Skip to content
PitVital edited this page Nov 23, 2022 · 31 revisions

Before You Start

For more information about the tools being installed and what they do, see our third party software and services page.

Most steps take place in the Terminal, which is in Applications > Utilities, or can be found with Spotlight Search. When you run a command and it doesn't end, and you want it to end, use the shortcut Ctrl-C.

These steps are our recommended approach to setting up CodeCombat's development environment. As long as you cover the General Setup Instructions, you can install these tools however you prefer.

Setup Steps

  1. Install Xcode.
  2. Install Xcode Command Line Tools. Open XCode and go through menus Xcode -> Preferences -> Downloads. This will install Git and provide the command line tools for building the development environment.
  3. Install NVM. This will help in installing Node, and NPM, the Node package manager. There are multiple ways to install Node, so if you install the latest Stable version some other way, skip down to setting up GitHub.
  4. Install Node and NPM with NVM. As of writing, we're using Node 14, so the command is nvm install v14. Check the node version we're using in package.json.
  5. The folder for CodeCombat has a file called .nvmrc that instructs nvm which version to use. That means that when you enter the folder in your terminal, nvm will switch to v14 automatically, and you should see a message saying something like this: Found '/your/path/here/codecombat/.nvmrc' with version <v14.16.0> Now using node v14.16.0 (npm v6.14.11)
  6. Create an account on GitHub. This is where our code repository is hosted.
  7. Configure Git to connect with your GitHub account.
  8. Clone the CodeCombat repository. git clone https://github.com/codecombat/codecombat. This will copy our source code and all its history to your computer to be run and modified.
  9. Install and compile CodeCombat source files. Navigate into the folder where you downloaded the CodeCombat repository (cd codecombat) and run npm install. This will install the npm (server library) and bower (client library) dependencies, as well as building the public directory, which is what the server... serves.
  10. Run the dev environment.
  11. Visit http://localhost:3000/ to see your CodeCombat development environment!
Clone this wiki locally