0 Installation & Running
dicedtomato edited this page 2020-06-27 14:39:06 -07:00

Get ready, because this page will have a lot of information.

Table of Contents

  1. Prerequisites
    1. Node
    2. Common Databases
    3. Installing Database Drivers
      1. PostgreSQL
      2. CockroachDB
      3. MySQL
      4. MariaDB
      5. Microsoft SQL Server
  2. Updating TypeX
  3. Installation
    1. Get the Source
    2. Setting up configurations
      1. Upload Size
      2. User Settings
      3. Site Settings
      4. SSL Settings
      5. Administrator user
      6. Database configuration
      7. Session Secret
      8. Particles.JS
    3. Compiling Source
    4. Running Compiled Source

Prerequisites

Dependencies needed for running TypeX

Node & Typescript

Node.JS is what runs the show, and you will need it before anything else. Install it here

Once Node is installed install Typescript by doing

npm i typescript -g

Verify your installation by running these commands

tsc -v
npm -v
node -v

They should all output something along the lines of

-> tsc -v
Version 3.8.3
-> npm -v
node 6.14.4
-> node -v
v13.13.0

Common Databases

(check out this for all types, you will need to use a different ORM config later on, view this for every option, more on this on Database configuration setup step)

Installing Database Drivers

In this installation step, you will be installing the drivers of your choice database.

Getting PostgreSQL Drivers

Run the following command in order to get PostgreSQL drivers

npm i pg --save-dev

Getting CockroachDB Drivers

Run the following command in order to get CockroachDB drivers

npm i cockroachdb --save-dev

Getting MySQL Drivers

Run the following command in order to get MySQL drivers

npm i mysql --save-dev

Getting MariaDB Drivers

Run the following command in order to get MariaDB drivers

npm i mariadb --save-dev

Getting Microsoft SQL Drivers

Run the following command in order to get Microsoft SQL drivers

npm i mssql --save-dev

Updating TypeX

Updating TypeX, is very simple. You can use this one-liner to update and compile code.

  1. Run the following in the typex directory, if there were config changes, you should change them before this command.
git pull && tsc -p .
  1. After that, you just need to restart the process for changes to take effect.

Installation

Now that you have considered what prerequisites you would like, lets actually install this! This installation is based on Linux systems, yet will work on both MacOSX and Windows with their respective commands

Get the Source & Install Dependencies

git clone https://github.com/dicedtomatoreal/typex
cd typex
tsc -p .
npm start

Compiling Typescript for running

Compile the Typescript code before running the code, or you can run it with ts-node which is not recommended. MAKE SURE YOU ARE IN THE PROJECT DIR!

tsc -p .

Running Compiled Source

Run the webserver by running

node out/src