9.0.3-alpha.11337.0 • Published 5 years ago

@energyweb/origin-backend v9.0.3-alpha.11337.0

Weekly downloads
34,791
License
GPL-3.0-or-later
Repository
github
Last release
5 years ago

Origin-Backend package provides the API for managing users, certificate, requests and devices in the Origin project.

Development

Origin-backend project is currently not meant to be run as a separate nest application. In order to run origin-backend project please refer to https://github.com/energywebfoundation/origin/tree/master/packages/origin-backend-app

Default TypeOrm configuration requires running PostgreSQL database. The detailed config with .env parameters is:

DB_HOST      - default 'localhost'
DB_PORT      - default 5432
DB_USERNAME  - default 'postgres',
DB_PASSWORD  - default 'postgres',
DB_DATABASE  - default 'origin',

or

DATABASE_URL  - postgres://{user}:{password}@{host}:{port}/{database}

Using TypeORM migrations

Exchange project uses TypeORM mechanism to perform SQL data migrations. For detailed information please refer to https://github.com/typeorm/typeorm/blob/master/docs/migrations.md

  • yarn typeorm:run to update DB to latest exchange tables schema
  • yarn typeorm:migrate SampleMigrationName to create new migration file based on the changes in the code entities

Development flow:

  • run yarn typeorm:run - to apply latest migrations
  • apply changes in the entities, like change the variable name or type
  • run yarn typeorm:migrate LastestChanges...
  • inspect newly created migration in /migrations folder
  • run yarn typeorm:run to apply newly created migration

Warning:

Existing migration files from /migration folder should never be edited after being committed.

PostgreSQL installation using Docker

docker pull postgres
docker run --name origin-postgres -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 postgres

pgAdmin

docker pull dpage/pgadmin4
docker run -p 80:80 \
    -e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \
    -e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
    -d dpage/pgadmin4
11.2.2

4 years ago

11.2.3

4 years ago

11.1.0

4 years ago

11.2.0

4 years ago

11.2.1

4 years ago

11.0.1

4 years ago

11.0.0

4 years ago

10.0.1

5 years ago

10.0.0

5 years ago

9.0.2

5 years ago

9.0.1

5 years ago

9.0.0

5 years ago

8.0.0

5 years ago

7.0.2

5 years ago

7.0.1

5 years ago

7.0.0

5 years ago

6.3.0

5 years ago

6.2.0

5 years ago

6.1.0

5 years ago

6.0.1

6 years ago

6.0.0

6 years ago

5.1.1

6 years ago

5.1.0

6 years ago

5.0.1

6 years ago

5.0.0

6 years ago

4.0.0

6 years ago

3.8.0

6 years ago

3.7.1

6 years ago

3.7.0

6 years ago

3.6.0

6 years ago

3.5.0

6 years ago

3.4.0

6 years ago

3.3.0

6 years ago

3.2.0

6 years ago

3.1.0

6 years ago

3.0.0

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.3.4-alpha.820

6 years ago

1.3.3

6 years ago

1.3.3-alpha.810

6 years ago

1.3.3-alpha.806

6 years ago

1.3.3-alpha.802

6 years ago

1.3.3-alpha.789

6 years ago

1.3.3-alpha.787

6 years ago

1.3.3-alpha.784

6 years ago

1.3.3-alpha.783

6 years ago

1.3.3-alpha.782

6 years ago

1.3.3-alpha.81

6 years ago

1.3.2

6 years ago

1.3.1-alpha.76

6 years ago

1.3.1

6 years ago

1.3.1-alpha.49

6 years ago

1.3.0

6 years ago

1.2.1-alpha.49

6 years ago