Skip to content

Commit 6d500cf

Browse files
authored
Feature/big cleanup (#64)
* remove robots.txt * simplify _about endpoint * remove express-handlebars * remove @kth/server and old SSL config
1 parent dc65a01 commit 6d500cf

13 files changed

+70
-813
lines changed

.azure/ref.parameters.json

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"LOGGING_LEVEL": "info",
1717
"NODE_ENV": "production",
1818
"SERVER_PORT": "3001",
19-
"SERVER_SSL": "false",
2019
"SERVICE_PUBLISH": "/api/node",
2120
"STDOUT_ENABLED": "true"
2221
}

__mocks__/kth-node-express-routing.js

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ const mocks = {
66
monitor: {
77
uri: '/_monitor',
88
},
9-
robots: {
10-
uri: '/robots.txt',
11-
},
129
},
1310
})),
1411
}

app.js

+3-9
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,7 @@ checkEnvironment()
6262
* ******* SERVER START *******
6363
* ****************************
6464
*/
65-
module.exports = server.start({
66-
useSsl: config.useSsl,
67-
pfx: config.ssl.pfx,
68-
passphrase: config.ssl.passphrase,
69-
key: config.ssl.key,
70-
ca: config.ssl.ca,
71-
cert: config.ssl.cert,
72-
port: config.port,
73-
logger: log,
65+
const { port } = config
66+
server.listen(port, () => {
67+
log.info(`Http server listening on port ${port}`)
7468
})

config/serverSettings.js

-7
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,8 @@ module.exports = {
2525
proxyPrefixPath: {
2626
uri: getEnv('SERVICE_PUBLISH', devPrefixPath),
2727
},
28-
useSsl: String(getEnv('SERVER_SSL', devSsl)).toLowerCase() === 'true',
2928
port: getEnv('SERVER_PORT', devPort),
3029

31-
ssl: {
32-
// In development we don't have SSL feature enabled
33-
pfx: getEnv('SERVER_CERT_FILE', ''),
34-
passphrase: getEnv('SERVER_CERT_PASSPHRASE', ''),
35-
},
36-
3730
// API keys
3831
api_keys: unpackApiKeysConfig('API_KEYS', devApiKeys),
3932

nodemon.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"ignore": ["*/__tests__/*", "*/__mocks__/*", "*/__snapshots__/*", "*.test.js", "./*.svg"],
33
"watch": [".", "swagger.json"],
44
"ext": "js,handlebars,scss,svg,png",
5-
"delay": 3000
5+
"delay": 1000
66
}

0 commit comments

Comments
 (0)