mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
added search microservice
This commit is contained in:
parent
f35a3e7dbd
commit
033f22bc9d
@ -10,7 +10,7 @@
|
||||
3007 -> ems (External Messaging Service)
|
||||
3008 -> users
|
||||
3009 -> notifications
|
||||
3010 -> unallocated
|
||||
3010 -> search
|
||||
3011 -> unallocated
|
||||
3012 -> unallocated
|
||||
3013 -> unallocated
|
||||
|
6
packages/server/services/search/package.json
Normal file
6
packages/server/services/search/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "search",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT"
|
||||
}
|
29
packages/server/services/search/search.service.js
Normal file
29
packages/server/services/search/search.service.js
Normal file
@ -0,0 +1,29 @@
|
||||
import { Server } from "linebridge"
|
||||
|
||||
import DbManager from "@shared-classes/DbManager"
|
||||
import RedisClient from "@shared-classes/RedisClient"
|
||||
|
||||
import SharedMiddlewares from "@shared-middlewares"
|
||||
|
||||
class API extends Server {
|
||||
static refName = "search"
|
||||
static wsRoutesPath = `${__dirname}/ws_routes`
|
||||
static routesPath = `${__dirname}/routes`
|
||||
static listen_port = process.env.HTTP_LISTEN_PORT ?? 3010
|
||||
|
||||
middlewares = {
|
||||
...SharedMiddlewares
|
||||
}
|
||||
|
||||
contexts = {
|
||||
db: new DbManager(),
|
||||
redis: RedisClient(),
|
||||
}
|
||||
|
||||
async onInitialize() {
|
||||
await this.contexts.db.initialize()
|
||||
await this.contexts.redis.initialize()
|
||||
}
|
||||
}
|
||||
|
||||
Boot(API)
|
Loading…
x
Reference in New Issue
Block a user