Browse Source

add something

main
matthew 2 years ago
parent
commit
071ab5e801
  1. 11
      docker-compose.yml
  2. 4
      searching-front/services/domain-watcher.ts
  3. 4
      searching-front/services/main.ts
  4. 2
      searching-front/services/modules/elastic/index.ts
  5. 9
      searching-front/services/parser.ts

11
docker-compose.yml

@ -18,17 +18,6 @@ services:
- es-net
ports:
- 9200:9200
kibana:
container_name: kb-container
image: kibana:7.17.6
environment:
- ELASTICSEARCH_HOSTS=http://es-container:9200
networks:
- es-net
depends_on:
- elasticsearch
ports:
- 5601:5601
proxy:
platform: linux/x86_64
build: ./proxy

4
searching-front/services/domain-watcher.ts

@ -1,5 +1,4 @@
import dotenv from "dotenv"
import path from "path"
import tonweb from "tonweb"
import {
JettonApi,
@ -11,7 +10,6 @@ import {
WalletApi,
Configuration,
} from "tonapi-sdk-js"
dotenv.config({ path: path.resolve(__dirname, "../.env.local") })
import db from "../db/index"
import axios from "axios"
import { getTonProxy } from "./helpers"

4
searching-front/services/main.ts

@ -1,7 +1,9 @@
import dotenv from "dotenv"
import path from "path"
dotenv.config({ path: path.resolve(__dirname, "../.env.local") })
import domainWatcher from './domain-watcher'
import parser from './parser'
const run = async()=>{
console.log('Start domain watcher')
await domainWatcher();

2
searching-front/services/modules/elastic/index.ts

@ -44,7 +44,7 @@ class Elastic {
private client: Client
constructor() {
this.client = new Client({
node: "http://localhost:9200",
node: "http://elasticsearch:9200",
})
}

9
searching-front/services/parser.ts

@ -1,12 +1,3 @@
import dotenv from "dotenv"
import path from "path"
import { JSDOM } from "jsdom"
import axios from "axios"
import tinyld from "tinyld"
import languagedetect from "languagedetect"
dotenv.config({ path: path.resolve(__dirname, "../.env.local") })
import db from "../db/index"
import Elastic from "./modules/elastic"
import Parser from "./modules/parser"

Loading…
Cancel
Save