Skip to main content

Pre-requisites

Before diving into development, ensure you have the necessary credentials and software.

Required Credentials

  • GitLab Access: You should have received your GitLab credentials via LastPass.
  • NPM Registry Token: A token for accessing Invent's private NPM packages.
  • Portal Link: A link to your Invent portal.

Software Installation

1. Visual Studio Code (VS Code)

We use VS Code for its flexibility and cross-platform compatibility.

2. Git

Git is essential for version control and interacting with our GitLab repositories.

3. Node.js

Node.js is required for managing dependencies and running the development environment.

  • Download and install Node.js from nodejs.org/en/download.
  • Verify the installation by running this command in your terminal:
    node --version
  • Expected output (example):
    v16.18.0

Access Configuration

1. Configure NPM Token

To access Invent's private NPM packages, follow these steps:

  1. Set the Registry:
    • Run:
      npm config set @invent:registry https://gitlab.apptrium.io/api/v4/packages/npm/

      NOTE: This command configures the @invent scope to use your GitLab NPM registry.

  2. Set the Authentication Token:
    • Run:
      npm config set //gitlab.apptrium.io/api/v4/packages/npm/:_authToken=<YOUR_NPM_TOKEN>

      NOTE: Replace <YOUR_NPM_TOKEN> with your actual token.

  3. Verification:
    • You can verify the settings by using npm config list. This will display your NPM configuration, and you should see the registry and the authentication token settings.

2. Set Up SSH Key for GitLab

SSH keys enable secure communication with GitLab. Follow these steps:

  1. Generate an SSH Key:
    • Run:
      ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
    • When prompted, choose a file to save the key, or press Enter for the default location.
    • Set a passphrase for added security.
  2. Copy the Public SSH Key:
    • Run
      cat ~/.ssh/id_rsa.pub
    • Copy the output.
  3. Add the Key to GitLab: (click here to learn more)
    • Log in to your Invent GitLab account.
    • Go to Preferences (via your profile picture).
    • Select SSH Keys from the left sidebar.
    • Click Add new key.
    • Paste the copied key into the Key field.
    • Provide a descriptive Title (e.g. "Work Laptop").
    • Click Add Key.
  4. Test the Connection:
    • Run
      ssh -T git@gitlab.apptrium.io
    • Output should look like:
      Welcome to Gitlab, @<account.name>