Serve & Build

Documentation of development server and build process


MatX Angular uses Angular Cli for development server and build process

  • 1. Make sure if NPM, NodeJs & Angular CLI is installed on your computer.
  • 2. Open terminal and navigate to root /matx-angular directory and run npm install to install dependencies.

Development server

Run ng serve -o to start local development server. You will be automatically redirected to your default browser's page which contains you served site. Open http://localhost:4200/ in browser if browser doesn't open automatically.

If you want to access your served site from other device open where should be replaced with the IP Address of the host machine where your site is served. In this case all the device should be under same network


Run ng build --prod to build your project. All files including compiled & minified css, js files will be stored in /dist directory.


If Node.js is already installed, make sure you’re running v8 or up.

JavaScript dependencies sometimes get out of sync and inexplicable bugs start to happen. Follow these steps to give a fresh start to your development environment:

  • 1. The installed npm version must be at least v6.9.0 You can update your npm with: npm install npm -g (sudo may be required).
  • 2. Re-install dependencies: rm -Rf node_modules && npm install
  • 3. Run npm start
  • If this did not work, try running npm cache clean and repeat the above steps.