mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
added ems service
This commit is contained in:
parent
c7f8d33aa6
commit
c2ed3d7c2b
23
packages/server/services/ems/ems.service.js
Normal file
23
packages/server/services/ems/ems.service.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { Server } from "linebridge/src/server"
|
||||||
|
import nodemailer from "nodemailer"
|
||||||
|
|
||||||
|
export default class API extends Server {
|
||||||
|
static refName = "ems"
|
||||||
|
static useEngine = "hyper-express"
|
||||||
|
static routesPath = `${__dirname}/routes`
|
||||||
|
static listen_port = process.env.HTTP_LISTEN_PORT ?? 3007
|
||||||
|
|
||||||
|
contexts = {
|
||||||
|
mailTransporter: nodemailer.createTransport({
|
||||||
|
host: process.env.SMTP_HOSTNAME,
|
||||||
|
port: process.env.SMTP_PORT ?? 587,
|
||||||
|
secure: process.env.SMTP_SECURE ?? false,
|
||||||
|
auth: {
|
||||||
|
user: process.env.SMTP_USERNAME,
|
||||||
|
pass: process.env.SMTP_PASSWORD,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Boot(API)
|
Loading…
x
Reference in New Issue
Block a user