-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- DockerFile to compile locally - the server as normal and tls - yaml files
- Loading branch information
Showing
6 changed files
with
117 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const { Server } = require('node-hl7-server') | ||
const fs= require('node:fs') | ||
const path = require('node:path') | ||
|
||
const server = new Server({ | ||
bindAddress: 'localhost', | ||
tls: { | ||
key: fs.readFileSync(path.join('certs/', 'server-key.pem')), | ||
cert: fs.readFileSync(path.join('certs/', 'server-crt.pem')), | ||
rejectUnauthorized: false | ||
} | ||
}) | ||
|
||
const inbound = server.createInbound({ port: 3000 }, async (req, res) => { | ||
await res.sendResponse('AA') | ||
}) | ||
|
||
inbound.on('client.close', () => { | ||
console.log('Client Disconnected') | ||
}) | ||
|
||
inbound.on('client.connect', () => { | ||
console.log('Client Connected') | ||
}) | ||
|
||
inbound.on('data.raw', (data) => { | ||
console.log('Raw Data:', data) | ||
}) | ||
|
||
inbound.on('listen', () => { | ||
console.log('Ready to Listen for Messages') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: hl7-server | ||
namespace: hl7-server | ||
spec: | ||
ports: | ||
- name: 6000-tcp | ||
port: 6000 | ||
protocol: TCP | ||
targetPort: 3000 | ||
selector: | ||
app: hl7-server | ||
type: LoadBalancer | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: hl7-server | ||
namespace: hl7-server | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: hl7-server | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: hl7-server | ||
spec: | ||
containers: | ||
- name: hl7-server | ||
command: ["npm"] | ||
args: ["run", "server"] | ||
image: docker-node-hl7-server:latest | ||
ports: | ||
- containerPort: 3000 | ||
imagePullPolicy: IfNotPresent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: tls-hl7-server | ||
namespace: hl7-server | ||
spec: | ||
ports: | ||
- name: 6001-tcp | ||
port: 6001 | ||
protocol: TCP | ||
targetPort: 3000 | ||
selector: | ||
app: tls-hl7-server | ||
type: LoadBalancer | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: tls-hl7-server | ||
namespace: hl7-server | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: tls-hl7-server | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: tls-hl7-server | ||
spec: | ||
containers: | ||
- name: tls-hl7-server | ||
command: ["npm"] | ||
args: ["run", "server:tls"] | ||
image: docker-node-hl7-server:latest | ||
ports: | ||
- containerPort: 3000 | ||
imagePullPolicy: IfNotPresent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters