0.0.63-rc.0 • Published 12 days ago

@onereach/types-hitl-api v0.0.63-rc.0

Weekly downloads
-
License
-
Repository
-
Last release
12 days ago

Getting Started

In this section we are going to explain how to run the application locally, without (almost) any OneReach dependencies.

Make sure OneReach NPM token is available

In order to install some dependencies you are going to need a valid token available as a variable - OR_NPM_TOKEN. If it is not available using echo $OR_NPM_TOKEN - you should ask someone to help you setup access to OneReach NPM.

Installing local PostgreSQL

If you already have a local PostgreSQL installed, or know how to do so - you are free to go to the next section.

The easiest way to install a local database - is by using Docker - Install Docker Desktop. After making sure Docker is installed and is available through command line as docker - we can proceed with installing and creating a local database.

Run the following commands (and replace mysecretpassword here and in the examples below with an actual password):

docker pull postgres
docker run --name postgresql-local -e POSTGRES_USER=hitl-app -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_DB=hitl-app-db -p 5432:5432 -d postgres

You should be able to connect to this database using command (enter the password, if it is asked):

docker exec -it postgresql-local psql hitl-app-db -U hitl-app -W

Connecting to the local database

Create a file named .env in the project root directory with the following content:

APP_DEV_PORT=8080
DB_USER=hitl-app
DB_PASSWORD=mysecretpassword
DB_HOST=localhost
DB_PORT=5432
DB_NAME=hitl-app-db

You can change all the values above, if you want to, just make sure that the variables in .env file point to some valid PostgreSQL instance.

Retrieving deploy config

Make sure you have deploy-platform project installed on your machine, and a command or is globally available.

Run the following commands:

or get-config --branch local --client development --env qa --feature master --project hitl-api --service hitl_api.config --service-or-eval service > config.json

A file config.json, which is ignored by git, should appear in the project root with some content.

Installing packages and starting the application

After installing third party dependencies, we can finally run:

npm install
npm start

This will start the application in the development mode as a simple express server. Changes to the code will be tracked and server will restart automatically.

An almost empty config.json file is required to build the application. In order to run the application on AWS, we are going to need real env variables that we are going to retrieve later.

Server now is ready to accept requests, but it will probably fail on every attempt to access database. In order to read and write from database we need to send a request to create or update our SQL tables.

In order to run all migrations to the latest version, run the following request in the console (or in Postman):

curl --location --request POST 'http://localhost:8080/api/v1/migrations' --header 'Authorization: user'

After successful response you should be able to send all other requests.

Testings the application

In order to verify that (most of) the application logic works, you should run:

npm test

If all tests pass successfully - congratulations, this means that the local deployment was successful.

0.0.63-rc.0

12 days ago

0.0.62

12 days ago

0.0.62-rc.1

22 days ago

0.0.62-rc.0

1 month ago

0.0.61

1 month ago

0.0.61-rc.0

1 month ago

0.0.60

1 month ago

0.0.60-rc.2

1 month ago

0.0.60-rc.1

2 months ago

0.0.58-rc.1

2 months ago

0.0.59-rc.0

2 months ago

0.0.59

2 months ago

0.0.58

2 months ago

0.0.60-rc.0

2 months ago

0.0.58-rc.0

2 months ago

0.0.57

2 months ago

0.0.57-rc.1

3 months ago

0.0.57-rc.0

3 months ago

0.0.56-rc.1

3 months ago

0.0.56

3 months ago

0.0.56-rc.0

4 months ago

0.0.55

4 months ago

0.0.55-rc.1

5 months ago

0.0.55-rc.0

5 months ago

0.0.54

5 months ago

0.0.54-rc.7

5 months ago

0.0.52-rc.0

8 months ago

0.0.49-rc.0

10 months ago

0.0.52-rc.2

8 months ago

0.0.52-rc.1

8 months ago

0.0.52-rc.3

8 months ago

0.0.51

8 months ago

0.0.52

7 months ago

0.0.53

6 months ago

0.0.50

9 months ago

0.0.48

10 months ago

0.0.49

10 months ago

0.0.54-rc.6

6 months ago

0.0.54-rc.5

6 months ago

0.0.54-rc.4

6 months ago

0.0.54-rc.3

6 months ago

0.0.54-rc.2

6 months ago

0.0.54-rc.1

6 months ago

0.0.54-rc.0

6 months ago

0.0.53-rc.0

7 months ago

0.0.53-rc.1

7 months ago

0.0.53-rc.2

7 months ago

0.0.53-rc.3

7 months ago

0.0.53-rc.4

7 months ago

0.0.51-rc.2

9 months ago

0.0.51-rc.0

9 months ago

0.0.51-rc.1

9 months ago

0.0.49-rc.1

10 months ago

0.0.50-rc.0

10 months ago

0.0.48-rc.3

11 months ago

0.0.46-rc.0

1 year ago

0.0.46-rc.1

1 year ago

0.0.46-rc.2

12 months ago

0.0.46-rc.3

12 months ago

0.0.46-rc.4

12 months ago

0.0.46-rc.5

11 months ago

0.0.45-rc.5

1 year ago

0.0.45

1 year ago

0.0.46

11 months ago

0.0.47

11 months ago

0.0.47-rc.0

11 months ago

0.0.48-rc.2

11 months ago

0.0.48-rc.0

11 months ago

0.0.48-rc.1

11 months ago

0.0.40-rc.1

1 year ago

0.0.40-rc.0

1 year ago

0.0.45-rc.1

1 year ago

0.0.45-rc.2

1 year ago

0.0.45-rc.3

1 year ago

0.0.45-rc.4

1 year ago

0.0.45-rc.0

1 year ago

0.0.43-rc.1

1 year ago

0.0.43-rc.0

1 year ago

0.0.42-rc.1

1 year ago

0.0.42-rc.0

1 year ago

0.0.40

1 year ago

0.0.41

1 year ago

0.0.42

1 year ago

0.0.43

1 year ago

0.0.44

1 year ago

0.0.44-rc.1

1 year ago

0.0.44-rc.0

1 year ago

0.0.41-rc.0

1 year ago

0.0.41-rc.2

1 year ago

0.0.41-rc.3

1 year ago

0.0.39

1 year ago

0.0.41-rc.4

1 year ago

0.0.41-rc.5

1 year ago

0.0.41-rc.6

1 year ago

0.0.38-rc.7

1 year ago

0.0.38

1 year ago

0.0.38-rc.5

1 year ago

0.0.38-rc.6

1 year ago

0.0.38-rc.3

1 year ago

0.0.38-rc.4

1 year ago

0.0.36-rc.0

1 year ago

0.0.35-rc.12

1 year ago

0.0.35-rc.11

1 year ago

0.0.35-rc.10

1 year ago

0.0.35-rc.16

1 year ago

0.0.35-rc.15

1 year ago

0.0.35-rc.14

1 year ago

0.0.35-rc.13

1 year ago

0.0.37

1 year ago

0.0.38-rc.0

1 year ago

0.0.38-rc.1

1 year ago

0.0.38-rc.2

1 year ago

0.0.35

1 year ago

0.0.36

1 year ago

0.0.37-rc.1

1 year ago

0.0.37-rc.0

1 year ago

0.0.35-rc.5

1 year ago

0.0.35-rc.4

1 year ago

0.0.35-rc.9

1 year ago

0.0.35-rc.8

1 year ago

0.0.35-rc.7

1 year ago

0.0.35-rc.6

1 year ago

0.0.33-rc.0

2 years ago

0.0.33

2 years ago

0.0.34

1 year ago

0.0.35-rc.1

1 year ago

0.0.35-rc.0

1 year ago

0.0.35-rc.3

1 year ago

0.0.35-rc.2

1 year ago

0.0.34-rc.0

2 years ago

0.0.32

2 years ago

0.0.32-rc.17

2 years ago

0.0.32-rc.16

2 years ago

0.0.32-rc.13

2 years ago

0.0.32-rc.15

2 years ago

0.0.32-rc.14

2 years ago

0.0.32-rc.2

2 years ago

0.0.32-rc.4

2 years ago

0.0.32-rc.3

2 years ago

0.0.32-rc.6

2 years ago

0.0.32-rc.5

2 years ago

0.0.32-rc.8

2 years ago

0.0.32-rc.7

2 years ago

0.0.32-rc.9

2 years ago

0.0.32-rc.12

2 years ago

0.0.32-rc.11

2 years ago

0.0.32-rc.10

2 years ago

0.0.30-rc.4

2 years ago

0.0.30-rc.3

2 years ago

0.0.30-rc.2

2 years ago

0.0.30-rc.8

2 years ago

0.0.30-rc.7

2 years ago

0.0.30-rc.6

2 years ago

0.0.30-rc.5

2 years ago

0.0.30-rc.9

2 years ago

0.0.30

2 years ago

0.0.31

2 years ago

0.0.32-rc.0

2 years ago

0.0.32-rc.1

2 years ago

0.0.30-rc.12

2 years ago

0.0.30-rc.13

2 years ago

0.0.30-rc.10

2 years ago

0.0.30-rc.11

2 years ago

0.0.30-rc.1

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.30-rc.0

2 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.4-rc.0

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.2-rc.2

2 years ago

0.0.2-rc.1

2 years ago

0.0.3-rc.0

2 years ago

0.0.2-rc.0

2 years ago

0.0.1-rc.2

2 years ago

0.0.1-rc.1

2 years ago

0.0.1-rc.0

2 years ago