Files
lst/lstDocs/docs/install.md

4.6 KiB

sidebar_position, id
sidebar_position id
2 install

Install Process

Get the latest build From Azure.

What you'll need

  • Node.js version 22.18 or above:

    • When installing Node.js, you are recommended to check all checkboxes related to dependencies.
  • VS Code:

    • If you plant to contribute or need to tweak some data this is the recommended editor.
    • During the app install updates and minor changes we will always be refering to VScode
  • Notepad ++;

    • An alternate solution to doing minor edits to the app including changes to the .env file
  • NSSM;

    • This is used to create the services and required to be in the root of the app.
  • Postgres;

    • This is the DB of choice.

Other Items

Firewall rules

If you will be using lst app on a tablet or scanner you will need to have 443 open please request this from IT

  • Logistics network as the source
  • Alpla prod server ip as the destination
  • ports to open
    • 443 # to access via https://
    • 3000 # This is in case you need to go direct to the app utlizing an ip:port

Creating the app

Create a new directory where all you will host the app recommeneded

E:\LST

Extract the build you downloaded from the repo.

You should see something similar to

LST/
├── .vscode/ # vscode settings to match across all developers/contributors
│ ├── settings.json
├── controller/
│ ├── main.go
│ ├── build_app.go
│ ├── bump_build.go
│ ├── zip_app.go
├── dist # Main backend
│ ├── internal
│ ├── db
│ ├── main.js
├── frontend/
│ ├── dist # Frontend app
│ ├── public
├── lstDocs/
│ ├── build # Docs on the entire app
├── lstWrapper/
│ │ ├── LastWrapper.exe
│ │ ├── LstWRapper.dll
│ │ ├── webconfig.xml
│ │ ├── several other files related to the wrapper
├── scripts/
│ │ ├── services.ps1 #service controler
├── .env-example
├── nssm.exe
├── package.json
├── package-lock.json
├── README.md
├── CHANGELOG.md
├── Dockerfile
├── docker-compose.yml
├── drizzle.config.ts
├── migrations # for all the db migrations
├── LICENSE

Doing the intial setup

Make sure you have installed both

  • VScode
  • Node

Installing dep

open the app in vs code open terminal

run the install command

npm run install

Creating the env

Create a copy of the .env-example file and rename it .env

Please review all comments in the env file to make sure you are only change what is needed to be change.

# server port - should only be changed if you really need this changed as its linked to the wrapper
VITE_PORT=4000

# TMS AccoutINFO - This is for Transport Insight only
USERID=ALPLAWS
PASSWORD=password
REQUESTUSER="ALPLAIMPORT"

# logLevel
LOG_LEVEL=debug

# alpaprod tec apiKey
TEC_API_KEY=apikey

# postgres db
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USER=username
DATABASE_PASSWORD=supersecretpasswrod
DATABASE_DB=lst

# prodServer
PROD_SERVER=usmcd1vms036
PROD_PLANT_TOKEN=test3
PROD_USER=alplaprod
PROD_PASSWORD=password

DB setup

Make sure you have installed Postrgres, and recommended to install PGAdmin

After the install is completed please open PGAdmin and login with

Create a new database and call it lst_db.

NOTE* You can change the db name you just need to match it to the same as name as you have set in the .env file

back in the termnial run the following command

npm run db:migrate

First Startup

Last step before moveing over to running as a service and running in iis please start up by running the below

npm start

As this is the first time you will see a lot of logs and eventually see the system say Running. Please visit http://localhost:4000 to validate everything is running and create the intial user by going to Register.

Please note the first user created is the system admin user, after created you will be able to login and change settings and activate features, as most features are disabled by default.

once you are ready to set this up and leave it head over to Setting up As Service