Installation

Install C3DService

RPM package

Allowed for Red Hat family OS.

Install command:

rpm -i {C3DSERVICE_PACKAGE}.rpm

Upgrade command:

rpm -U {C3DSERVICE_PACKAGE}.rpm

DEB package

Allowed for Debian/Ubuntu family OS.

Install/upgrade command:

dpkg -i {C3DSERVICE_PACKAGE}.deb

Linux archive

  1. Unzip the archive

  2. Edit config.json file

  3. Run service by command:

./c3dservice run --log-level=trace --config=./config.json

Windows archive

  1. Unzip the archive

  2. Edit config.json file

  3. Run service by command of cmd.exe:

c3dservice.exe run --log-level=trace --config=.\config.json

Docker image

Install Docker image command:

docker load < {C3DSERVICE_DOCKER}.tar.gzip

Now the image webservice may be used to run container or docker-compose.

Adding a Repository

C3D Web Viewer API package is distributed using a private npm repository. To install the package, firstly you should set @c3dlabs registry.

There is two available npm repositories.

Classic NPM

Installed via:

npm config set @c3dlabs:registry https://npm.c3d.ascon.ru

If you use npm with a version above 9.x.x, then it needs to run:

npm login --registry https://npm.c3d.ascon.ru --auth-type=legacy

If you use npm with a version below 9.x.x, then it needs to run:

npm login --registry https://npm.c3d.ascon.ru

GitLab NPM

Some customers have a problem with authentication of a classic npm that is expired quickly. This is especially true for СI problems with container systems.

Alternative NPM repository via GitLab has a non-expired keys.

Installed via commands:

npm config set @c3dlabs:registry https://gitlab.c3d.ascon.ru/api/v4/projects/48/packages/npm
npm config set //gitlab.c3d.ascon.ru/api/v4/projects/48/packages/npm:_authToken {GITLAB_ACCESS_TOKEN}

Installing the Package

Now you can simply add the ‘c3dviewer-api’ package to your project via:

npm install --save @c3dlabs/c3dviewer-api

If you install any of prerelease versions of the package like

npm install --save @c3dlabs/c3dviewer-api@1.4.0-alpha.1

you may encounter the following problem:

Could not resolve dependency: … Conflicting peer dependency: …

This is caused by dependencies which are not met with prerelease versions. In such cases, just force to install it using:

npm install --save -f @c3dlabs/c3dviewer-api@1.4.0-alpha.1