-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,3 @@ jobs: | |
- name: Run a test | ||
run: | | ||
cd apps/webhook && pnpm test:e2e | ||
pnpm test |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import * as http from 'http'; | ||
import * as express from 'express'; | ||
import { serve } from '@novu/echo/express'; | ||
import { Echo } from '@novu/echo'; | ||
|
||
class EchoServer { | ||
private server: express.Express; | ||
private app: http.Server; | ||
private port = 9999; | ||
public echo = new Echo({ devModeBypassAuthentication: true }); | ||
|
||
get serverPath() { | ||
return `http://localhost:${this.port}`; | ||
} | ||
|
||
async start() { | ||
this.server = express(); | ||
this.server.use(express.json()); | ||
this.server.use(serve({ client: this.echo })); | ||
|
||
this.app = await this.server.listen(this.port); | ||
} | ||
|
||
async stop() { | ||
await this.app.close(); | ||
} | ||
} | ||
|
||
export const echoServer = new EchoServer(); |