This repository shows how to package and deploy an angular web application in the Nuxeo Platform. The most important take away is that nothing changes web developers as the packaging for the nuxeo platform doesn't iterfere with the angular developement workflow and tooling.
The content of this repository is only relevant for client side rendering application. For server side rendering, a Node.js Express server is required.
In order to create a nuxeo marketplace package, java tooling is required:
- JDK 21
- Maven
The Nuxeo Maven repositories must be configured in order to be able to download the private artifacts. This project contains a sample maven configuration file that can be used as a starting point.
cp resources/settings.xml ~/.m2/settings.xml
Open the ~/.m2/settings.xml
file with a text editor and set the username and password for the maven-private repository. The username/password are the same as the ones used for the nuxeo private docker repository.
git clone https://github.com/nuxeo-sandbox/nuxeo-angular-sample-app-packaging
cd nuxeo-angular-sample-app-packaging
mvn clean install
This project includes the build of a custom nuxeo docker image where the sample angular application package is pre-installed
docker-compose up -d
Then open http://localhost:8080
If you wish to publish your app package in your private space on the nuxeo marketplace, this can be done using the marketplace UI or using the REST API:
curl -u CONNECT_USER:CONNECT_TOKEN \
-F package=@nuxeo-angular-package/target/nuxeo-angular-sample-package-VERSION.zip \
"https://connect.nuxeo.com/nuxeo/site/marketplace/upload?batch=true&supported=false&orgId=ORG_ID"
The angular application development workflow and tooling is unchanged for web developers. The Nuxeo platform build tooling, maven, simply encapsulates the angular and node.js tooling using ant.
The web application source is located in the nuxeo-angular-sample-web folder
All the nuxeo configuration is located in the nuxeo folder
There are 4 different configuration items in this sample project:
- Set the authentication method for the application here
- Set /nuxeo/app/ as an application path that the login page can redirect to upon successful authentication here
- Set /nuxeo/app/ to be the default UI here
- Support the angular browser router by rewriting all non file URL to return index.html using the Tomcat REWRITE valve (useful for development, but typically set up at the reverse proxy level for other environments) here
In all the configuration points, the /app
part must be the same name as the one configured in the base url in the angular configuration.
These are provided as examples and can simply be removed if irrelevant for a project.
Moreover, when packaged for the Nuxeo Platform, the index.html file is converted to index.jsp in order to take advantage of the configurability of the Nuxeo Platform.
Nuxeo Platform is an open source Content Services platform, written in Java. Data can be stored in both SQL & NoSQL databases.
The development of the Nuxeo Platform is mostly done by Nuxeo employees with an open development model.
The source code, documentation, roadmap, issue tracker, testing, benchmarks are all public.
Typically, Nuxeo users build different types of information management solutions for document management, case management, and digital asset management, use cases. It uses schema-flexible metadata & content models that allows content to be repurposed to fulfill future use cases.
More information is available at www.nuxeo.com.