Running Coral for development is very similar to installing Coral via Source as described above.
Coral requires NodeJS >=12, we recommend using
nvm to help manage node
# Clone and cd into the Coral directory. git clone https://github.com/coralproject/talk.git cd talk # Install dependencies. npm install
Running Coral with default settings assumes that you have:
- MongoDB >=4.2 running on
- Redis >=3.2 running on
If you don’t already have these databases running, you can execute the following assuming you have Docker installed on your local machine:
docker run -d -p 27017:27017 --restart always --name mongo mongo:4.2 docker run -d -p 6379:6379 --restart always --name redis redis:3.2
We recommend installing watchman for better watch performance.
# On macOS, you can run the following with Homebrew. brew update brew install watchman
Then start Coral with:
# Run the server in development mode in order to facilitate auto-restarting and # rebuilding when file changes are detected. This might take a while to fully run. npm run watch
When the client code has been built, navigate to http://localhost:8080/install
to start the installation wizard. Note: Ensure
localhost:8080 is used in the permitted domains list.
To see the comment stream goto http://localhost:8080/.
To run linting and tests use the following commands:
# Run the linters. npm run lint # Run our unit and integration tests. npm run test
To test out the email sending functionality, you can run inbucket which provides a test SMTP server that can visualize emails in the browser:
docker run -d --name inbucket --restart always -p 2500:2500 -p 9000:9000 inbucket/inbucket
You can then configure the email server on Coral
by setting the email settings in
Configure -> Email in the admin:
Navigate to http://localhost:9000, click the “Monitor” tab. New emails received on this screen.
We use docz to document and develop our Design Language System. To start docz run:
# Make sure CSS types are generated. # This is not required when `npm run watch` is already running. npm run generate:css-types # Run docz in development. npm run docz -- dev
After compilation has finished you can access docz at http://localhost:3030/.