Update dev-pipeline
This commit is contained in:
2
.github/workflows/dev-pipeline.yml
vendored
2
.github/workflows/dev-pipeline.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
port: 22
|
port: 22
|
||||||
script: |
|
script: |
|
||||||
cd ~/online-energieausweis
|
cd ~/online-energieausweis
|
||||||
git reset --hard HEAD
|
git reset --hard origin/main
|
||||||
git clean -f -d
|
git clean -f -d
|
||||||
git pull origin main
|
git pull origin main
|
||||||
git status
|
git status
|
||||||
|
|||||||
19
server.ts
19
server.ts
@@ -1,7 +1,5 @@
|
|||||||
import express from 'express';
|
import express from 'express';
|
||||||
import { handler as ssrHandler } from './dist/server/entry.mjs';
|
import { handler as ssrHandler } from './dist/server/entry.mjs';
|
||||||
import https from "https"
|
|
||||||
import * as fs from "fs"
|
|
||||||
|
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
@@ -13,21 +11,4 @@ app.listen(80, function() {
|
|||||||
console.log('Server started on http://localhost:80');
|
console.log('Server started on http://localhost:80');
|
||||||
});
|
});
|
||||||
|
|
||||||
const privateKey = fs.readFileSync('/etc/letsencrypt/live/ibcornelsen.de/privkey.pem', 'utf8');
|
|
||||||
const certificate = fs.readFileSync('/etc/letsencrypt/live/ibcornelsen.de/cert.pem', 'utf8');
|
|
||||||
|
|
||||||
if (privateKey && certificate) {
|
|
||||||
https.createServer({
|
|
||||||
key: privateKey,
|
|
||||||
cert: certificate
|
|
||||||
}, app).listen(443, function() {
|
|
||||||
console.log('Server started on https://localhost:443');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.error('No SSL certificate found');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user