On the backend (aka. the server-side), CodeStream runs a number of services to provide all the functionality needed for the clients. The default development environment will use the codestream broadcaster and rabbitMQ. Mail services are disabled by default.
Note: CodeStream employees may prefer to use the dev_tools sandbox as it will provide most of the ancillary resources you'll need. Details here.
-
Mac or Linux computer using zsh or bash.
-
Official CodeStream builds (CI) use Nodejs 12.14.1 with npm 6.13.4
-
Docker Desktop which we'll use to provide MongoDB and a pre-configured RabbitMQ.
If you do not wish to use docker, you'll need to provide both of these services:
-
MongoDB 3.4.9 with
mongodb://localhost/codestreamproviding full access to create collections and indexes in thecodestreamdatabase. If you're willing to run docker, the instructions below will show you how to install a MongoDB docker container. -
RabbitMQ 3.7.x with the delayed message exchange plugin. You'll also need to create a codestream user with access. Notes here.
-
Fork the codestream-server repo and clone it.
-
Setup your shell's environment
cd codestream-server source dev-env.sh # custom settings go in .sandbox-config.sh -
Install all the node modules
npm run install:all -
Install the rabbitmq docker container pre-configured for codestream (the container name will be csrabbitmq)
npm run run:docker:csrabbitmq -
Create a docker volume for mongo and launch the mongodb docker container. The docker volume will ensure the data persists beyond the lifespan of the container.
npm run run:docker:csmongo -
In a separate shell, source in the
dev-env.shenvironment and start up the api service. It will repeatedly try to connect to the broadcaster. That's ok. Move on once you've started it.source dev-env.sh npm run start:api -
In a another separate shell, source in the
dev-env.shenvironment and start up the broadcaster service.source dev-env.sh npm run start:broadcaster -
In yet another shell, source in the
dev-env.shenvironment and start the onprem admin UI. This will first run webpack to build public/bundle.js (which contains the client-side code).source dev-env.sh npm run start:opadmIf your intention is to work on the admin_server, you'll want another shell to run
npm run devwhich will run webpack in watch mode to keep bundle.js updated WRT client-side code which is stored in src/. -
The inbound email service is disabled in the default config.
source dev-env.sh npm run start:mailin -
The outbound email service is also disabled in the default config.
source dev-env.sh npm run start:mailout
Point your CodeStream extension to http://localhost:12000. You should be able to register and create codemarks. The onprem admin console is at http://localhost:12002
Develop to your heart's content!!!! We love pull-requests.