Files
lst/lstDocs/docs/install.md
2025-08-26 15:25:09 -05:00

155 lines
3.8 KiB
Markdown

---
sidebar_position: 2
---
# Install Process
Get the latest build **From Azure**.
<!-- Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**. -->
### What you'll need
- [Node.js](https://nodejs.org/en/download/) version 22.18 or above:
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
- [VS Code](https://code.visualstudio.com/download):
- 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 ++](https://notepad-plus-plus.org/);
- An alternate solution to doing minor edits to the app including changes to the .env file
- [NSSM](https://nssm.cc/);
- This is used to create the services and required to be in the root of the app.
- [Postgres](https://www.postgresql.org/download/);
- This is the DB of choice.
## Creating the app
Create a new directory where all you will host the app recommeneded
```bash
E:\LST
```
Extract the build you downloaded from the repo.
You should see something similar to
```bash
LST/
├── .vscode/ # vscode settings to match across all developers/contributors
│ ├── settings.json
├── dist # Main backend
│ ├── internal
│ ├── db
│ ├── main.js
├── frontend/
│ ├── dist # Frontend app
├── 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
```
## Doing the intial setup
Make sure you have installed both
- VScode
- Node
### Installing dep
open the app in vs code
open terminal
![](./install-extras/img/terminal.png)
run the install command
```bash
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.
```bash
# 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 = "api key"
# postgres db
DB_HOST=localhost
DB_PORT=5433
DB_USER=username
DB_PASSWORD=superSecretPassword
DB_NAME=lst_db
```
### 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
```bash
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
```bash
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](http://localhost:4000/)
to validate everything is running and create the intial user
by going to [Register](http://localhost:4000/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](/docs/install-extras/services)