alfresco-content-app/docs/getting-started/building-from-source.md
Denys Vuika 46ed7a8360
[ACA-4715] reduce env variables and provide defaults (#3311)
* use default "sessionTimeForOpenAppDialogDisplay"

* improve iPhone prefix url api

* improve android prefix url api

* session timeout

* app store url defaults

* enable mobile redirect by default

* enable AOS by default

* enable content plugins by default

* enable folder rules by default

* remove obsolete AI flag

* remove obsolete APA flag

* auto download defaults

* cleanup auth vars
2023-07-05 15:21:45 +01:00

1.8 KiB

Title
Title
Building from source

Building from source

The Content App is based on Angular CLI, and you can use all the commands, generators, and blueprints supported by the CLI.

Prerequisites for building

The Angular CLI libraries are already part of the setup. You may want installing it as a global (recommended) tool only if you intend using CLI commands separately.

Cloning and running

Use the following commands to clone the project, install dependencies and run it.

git clone https://github.com/Alfresco/alfresco-content-app.git
cd alfresco-content-app
npm install
npm start

The application runs at port 4200 by default, and should automatically open in the default browser once the project has compiled.

Setting up environment variables

You need to set some environment variables to be able to run the local dev server. In the project root folder, create an .env file (this is gitignored) with the following data:

# App config settings
APP_CONFIG_ECM_HOST="<URL>"

Proxy settings

The Content App provides a proxy configuration for a local development server that allows you to address specific scenarios with CORS and a native authentication dialog.

You can find settings in the proxy.conf.js file in the project src directory. By default, settings coming from environment variables have higher priority.

Note: The proxy settings get automatically applied every time you run the application with the npm start script. You must restart the application every time you change its settings.

Running unit tests

Run npm test to execute the unit tests via Karma.