Skip to content

Commit

Permalink
Merge pull request #11 from koskedk/dev
Browse files Browse the repository at this point in the history
adding ssl
  • Loading branch information
koskedk authored Sep 10, 2019
2 parents a72f5de + 36c2f23 commit ae6d180
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ import { Transport } from '@nestjs/microservices';
import { SeederModule } from './infrastructure/seeder';
import { log } from 'util';
import { Logger } from '@nestjs/common';
import { fs } from 'fast-glob/out/utils';
import { ConfigService } from './config/config.service';
import { ConfigModule } from './config/config.module';
import { join } from 'path';
import * as fs from "fs";

async function bootstrap() {
const app = await NestFactory.create(AppModule);
const httpsOptions = {
key: fs.readFileSync('./secrets/demo-key.pem'),
cert: fs.readFileSync('./secrets/demo-cert.pem'),
};
const app = await NestFactory.create(AppModule,{httpsOptions});
const config = app.get(ConfigService);
Logger.log(`starting in ${process.env.NODE_ENV} mode`);
const microservice = app.connectMicroservice(config.QueueConfig);
Expand Down
31 changes: 31 additions & 0 deletions packages/server/src/secrets/demo-cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-----BEGIN CERTIFICATE-----
MIIFXTCCBEWgAwIBAgISAxmAVv259vmEqAX3lLv9+Fw9MA0GCSqGSIb3DQEBCwUA
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xOTA5MTAwODMwMTVaFw0x
OTEyMDkwODMwMTVaMB0xGzAZBgNVBAMTEnNwb3Qua2VueWFobWlzLm9yZzCCASIw
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMEh7kFVRWl9D/N+lO7Mw3WbW69M
kIiLxEU45oJkKfoFmfeF7/qgAlw1hTs6S8omLwGCt8J/XAI+urfxpv9PNS9gRKKo
SZm+x01LXfxq/lHKkr/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xYwkkGGcuXKKCpn1cSIdWMA0G
CSqGSIb3DQEBCwUAA4IBAQBq743BPN/iQ2bDd14dJ0n9uKIW1G82u7Uv0WS6rt6H
pjQ3cO4sGGFQ5ONTgeFu34KkK1epRWp7ZJdERYorpx7EvENfkxKBsqz6tqwD89QG
3NjUeGPN0kMQuvD0HwxY59ukFla/8rP8zuGM8nnsI4Z0smNnuaTZkpf/7NpLSjN3
poIL/AjQr9aqgUkO9b+ISPwE4sdUw7N9et4/5eREO3ylw2jGyGIpOXobm5QVQTNr
dNA6o1Ll3tnJGGaXthD8O+lQWeMHvO9HMjeSycnJUvxG2BUk4TiMFSzy3uEt7sO6
l7AGdFuTxFIlyF3ov7abCQcmqWddguhycgUn30RMMLY3
-----END CERTIFICATE-----
60 changes: 60 additions & 0 deletions packages/server/src/secrets/demo-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
-----BEGIN CERTIFICATE-----
MIIFXTCCBEWgAwIBAgISAxmAVv259vmEqAX3lLv9+Fw9MA0GCSqGSIb3DQEBCwUA
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xOTA5MTAwODMwMTVaFw0x
OTEyMDkwODMwMTVaMB0xGzAZBgNVBAMTEnNwb3Qua2VueWFobWlzLm9yZzCCASIw
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMEh7kFVRWl9D/N+lO7Mw3WbW69M
kIiLxEU45oJkKfoFmfeF7/qgAlw1hTs6S8omLwGCt8J/XAI+urfxpv9PNS9gRKKo
SZm+x01LXfxq/lHKkr/tI1cOgkJVj6OPXSeFHT+Z2x5cgFdKO1R5A2gYD0QxPx/Y
hZ+D6YWQL70Xc5K1zz16aCH25wjKz5lH8mxusa4tuwBz4eK+/KYBOiJJH6eeXBBB
9zTRvZp9fkOPF04+f1zdB7N2xvTC9aR5s3qf7UUoInFa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NjUeGPN0kMQuvD0HwxY59ukFla/8rP8zuGM8nnsI4Z0smNnuaTZkpf/7NpLSjN3
poIL/AjQr9aqgUkO9b+ISPwE4sdUw7N9et4/5eREO3ylw2jGyGIpOXobm5QVQTNr
dNA6o1Ll3tnJGGaXthD8O+lQWeMHvO9HMjeSycnJUvxG2BUk4TiMFSzy3uEt7sO6
l7AGdFuTxFIlyF3ov7abCQcmqWddguhycgUn30RMMLY3
-----END CERTIFICATE-----
root@CICDReleaseServer:/etc/letsencrypt/live/spot.kenyahmis.org# cat ../../archive/spot.kenyahmis.org/privkey1.pem
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDBIe5BVUVpfQ/z
fpTuzMN1m1uvTJCIi8RFOOaCZCn6BZn3he/6oAJcNYU7OkvKJi8BgrfCf1wCPrq3
8ab/TzUvYESiqEmZvsdNS138av5RypK/7SNXDoJCVY+jj10nhR0/mdseXIBXSjtU
eQNoGA9EMT8f2IWfg+mFkC+9F3OStc89emgh9ucIys+ZR/JsbrGuLbsAc+Hivvym
AToiSR+nnlwQQfc00b2afX5DjxdOPn9c3Qezdsb0wvWkebN6n+1FKCJxWkLZJNuN
1bH4WEb7FL90sQhoLlTuwE9e5DSny74OiVjYbtf3EY+MCRZwunFJl4RhqJKtbBdP
xygqNUl7AgMBAAECggEAA/+83DN0zXteci9DzDIHNg8ydc3DDGDAfqJv+3ExgVDO
YFawomLfyaL+EDzjxtrFjGV1gpx6fj1oRljFmXG9ay62HRwY8gsGO259ErXwcCce
pMS3P504S0FUSRG13xSdh2ybIeTOb4BE/DnJPUWKQ2I1qWYlVik4E6DprCOpK/d4
jrVq0ZaXPSfvnqjAYMy5c6P3c0UHk/DrjIbqLq9DJ8uc/zl0fYsMatIgNx+cV7Ia
Mm5yVGaNxJ/c/K8Iwx8/8BeOlG8BnqQr7K2xOVhW7jjYjrxQCpIVg9kgqaspXsbm
bXFa43XjRLFK0vOuV7ffV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