Get ready, because this page will have a lot of information.
Table of Contents
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
- PostgreSQL
- CockroachDB
- MySQL
- MariaDB
- Microsoft SQL Server
- MongoDB (Coming soon!)
(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.
- Run the following in the
typex
directory, if there were config changes, you should change them before this command.
git pull && tsc -p .
- 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