Set up your development environment for building, running, and testing the Mattermost web app.
Set up your development environment for the Mattermost server.
Install dependencies:
On Mac, use Homebrew to install Node.js v10 and libpng:
brew install node@10 libpng
For other platforms, install Node.js v10 from https://www.npmjs.com/get-npm.
Prefer to use NVM to manage different versions of Node on a given machine? Ensure you’re running Node v10.15.3+ and npm v6.4.1+ to avoid compatibility-related Jest test failures.
Clone the Mattermost source code from your fork next to your mattermost-server directory:
git clone https://github.com/$GITHUB_USERNAME/mattermost-webapp.git
Link the client directory in your server with the dist directory in your webapp:
cd mattermost-server
ln -nfs ../mattermost-webapp/dist client
cd ..
Test your environment:
cd mattermost-webapp
make test
When tests pass, run the app:
make run
Refreshing http://localhost:8065 should now load the UI.
If you would like the webapp to automatically refresh as you edit the source code you can install and enable the live reload script injection extension for your web browser (Chrome | Firefox). Then, before running webpack run:
export MM_LIVE_RELOAD=true