-
Notifications
You must be signed in to change notification settings - Fork 34
Setting up a developer environment
Ian Turgeon edited this page Jul 2, 2020
·
14 revisions
Obojobo uses javascript on both the client and server. The upside is this streamlines things a little (same testing framework, same language, same tooling for frontend and backend).
The UCF team behind Obojobo exclusively develops on MacOS, so we can only suggest doing the same yourself. It is possible to use other platforms, but we haven't smoothed out any of the bumps. Though, we welcome any PR's that address issues developing on other platforms.
You're going to need Node and Yarn. We highly suggest using nvm to manage node versions, as we keep supported node versions pretty narrow, and update to newer versions regularly. You may find yourself having to switch node versions between branches.
- Install nvm using homebrew (highly suggest not installing node or yarn directly via homebrew)
- Install the version of node used by obojobo (check
engines
directive in package.json) - Install yarn using npm
npm install -g yarn
- Install Docker for Mac (to run a PostgreSQL container in step 7)
- Fork obojobo on github and clone to your machine using git
- Run
yarn install
(or just yarn) to install all the dependencies - Run
yarn db:rebuild
to create your PostgreSQL container and run db migrations - Run
yarn dev
to start a development server! (watch console output for the address to open in your browser) - Visit
https://<yourlocalhost>:<port>/dev
to find the developer dashboard
- always remember to run yarn install when switching branches or merging in upstream changes
- If jest starts to report a TON of errors that look like it all of a sudden doesn't understand
import
, delete node_modules and run yarn install. If it persists, try to Stash your changes and clean up untracked files withgit clean -dxn
(removen
to actually delete). If it still persists, delete all contents of the packages directory and use git reset or git checkout to get them back.