Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
14 changes: 14 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
APP_PORT = 5000

DB_CONNECTION = postgres
DB_HOST = localhost
DB_PORT = 5432
DB_PORT_FOR_OFFICE = 3000
DB_USERNAME = postgres
DB_PASSWORD = arsenpost
DB_NAME = converter

AMQP_URL = amqp://localhost:5672
AMQP_PROTOCOL = amqp
AMQP_HOST = localhost
AMQP_PORT = 5672
33 changes: 33 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"prettier",
"import"
],
"extends": [
"airbnb-typescript/base",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:prettier/recommended",
"prettier",
"prettier/@typescript-eslint",
"plugin:import/typescript"
],
"rules": {
"no-unused-vars": "off",
"no-console": "off",
"linebreak-style": "off",
"class-methods-use-this": "off"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".ts"]
}
}
}
}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.idea/
.vscode/
node_modules/
build/
tmp/
temp/
convertedPhotos
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:14

WORKDIR /usr/src/index

COPY package*.json ./

RUN npm install
# RUN npm ci --only=production

COPY . .

EXPOSE 3000

CMD [ "node", "build/index.js" ]
31 changes: 0 additions & 31 deletions converter.service.ts

This file was deleted.

Empty file added docker-compose.yml
Empty file.
19 changes: 19 additions & 0 deletions ormconfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export default {
type: process.env.DB_CONNECTION,
host: process.env.DB_HOST,
port: process.env.DB_PORT,
// port: process.env.DB_PORT_FOR_OFFICE,
username: process.env.DB_USERNAME,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
synchronize: false,
logging: true,
entities: ['src/models/*.ts'],
migrations: ['src/migrations/*.ts'],
subscribers: ['src/subscribers/**/*.ts'],
cli: {
entitiesDir: 'src/models',
migrationsDir: 'src/migrations',
subscribersDir: 'src/subscribers',
},
};
Loading