Installation Guides
Our installation guides are split into per-OS guides which will give you step-by-step instructions on how to get your development environment set up. Aimed at beginners.
- Linux Setup
- Windows Setup
- Mac Setup
- Vagrant Setup (Experimental, all OS)
General Setup Instructions
For power users who know what they're doing
This is the general overview for what you need in order to set up the development environment. For more specific instructions with recommended paths to success, see the installation guides listed above.
- Install MongoDB, Node.js Stable version, Git, and Python 2.7
git clone
this repository.npm install
in the repository's root directory.- Start MongoDB and import the database dump
Running The Environment
After installation, to run the site locally, enter the following commands in separate terminals:
./bin/coco-mongodb
(runs the MongoDB server)npm run nodemon
(runs the server, automatically restarting on server-side changes)npm run brunch watch
(compiles app files to public folder continuously, refreshing the browser window on changes)
You can also use the command npm run dev
to both run brunch and the server in one terminal. If you don't need nodemon or brunch to restart on changes or build files, you can simply run npm run start
instead.
Running The Proxy
If you are working solely on the website, not the server, you can run your development environment as a proxy to CodeCombat's production servers. This allows you to see your changes using live data, rather than downloading or building a local database. To run the proxy:
npm run proxy
npm run brunch watch
Note that you do not need to run or even set up MongoDB to develop on the proxy.
Issues
There's a list of dev setup issues and workarounds here. If you have a problem and we figure out how to get around it, please help by updating this page.
Working in the environment
You don't need any particular IDE to work with CodeCombat. Scott uses WebStorm, Nick uses Emacs, and George uses Sublime Text, so already the most important parts are IDE-agnostic. We need help making it friendly for Linux and Windows, though, since we all develop on Mac.
Whichever editor you use, be sure to disable removing trailing whitespace from files, at least for jade files. Sometimes (although rarely) these have significant whitespace.
Live-coding
If Brunch is running and you make code changes, Brunch will reload the page automatically. So open the page you are working on in your browser, make changes in your editor, save, and the page will refresh so you can see the changes. Try to make whatever you're working on be the first thing you see when you open the page, so you don't have to lose focus on your editor while iterating. If you edit just the styling, Brunch will apply the new styling without refreshing.
Database
The link to the database dump is: http://analytics.codecombat.com:8080/dump.tar.gz
To import the database into MongoDB, unpack the archive and run: mongorestore --drop /path/to/dump
When building in the dev environment, you have a filtered copy of the live database with just the publicly available data. It may look like what you'll find on the site, but changes you make won't show up on the site. To keep the database dump small, we only include a handful of testing levels, so the first two levels show up, but not the third. If you need to work on a specific level, let us know and we can provide you with more levels.
Currently, there's no easy way to transfer data you make on your dev environment back to production, so be sure to build levels you want to share on direct.codecombat.com, not on the dev server.
Third Party Services
API services we use such as MailChimp will not be accessible unless you have an API key. Generally you shouldn't need them to work on the site, but if you do, then let us know.
- Home
- Archmage Home
- Artisan Home
- Adventurer Home
- Scribe Home
- Diplomat Home
- Ambassador Home
- Archmage General
- Mission statement
- Coco Models
- Coding Guidelines
- Cookbook
- File system
- JSON Schema
- Technical overview
- Testing
- Third party software and services
- Artisan General
- Building A Level
- Coding Guidelines for Artisans
- Editing Thang Components
- Important Artisan Concepts
- Keyboard Shortcuts
- Artisan How-To Index
- Adventurer General
- Scribe General
- Diplomat General
- i18n
- i18n Glossary nb
- i18n Glossary ru
- i18n Glossary es-419
- Ambassador General
- Dev Setup
- Dev Setup: Linux
- Dev Setup: Windows
- Dev Setup: Mac
- Dev Setup: Vagrant
- Dev Setup: Issues
- Game Engine
- Component
- Multiplayer
- Surface
- System
- Thang
- Thang Component System
- Tome
- World
- Artisan Tabs
- Components And Systems
- Scripts
- Settings
- Thangs
- Other
- Aether
- Client models
- Developer organization
- Educational Standards
- Events, subscriptions, shortcuts
- Chat Room
- Chat Room Rules
- Permissions
- Project Ideas List
- Treema
- Versioning
- Views
CodeCombat | Home | Blog | Forum | Teachers | Legal | Contribute