Skip to content

Commit

Permalink
src: add separate frontend app and opossum 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lance committed Jun 12, 2019
1 parent a3b1a79 commit ebabdf3
Show file tree
Hide file tree
Showing 27 changed files with 14,753 additions and 9,469 deletions.
6 changes: 2 additions & 4 deletions adjective/.nodeshift/deployment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
apiVersion: v1
kind: Deployment
metadata:
name: adjective
spec:
Expand All @@ -8,12 +6,12 @@ spec:
containers:
- readinessProbe:
httpGet:
path: /api/health
path: /api/health/readiness
port: 8080
scheme: HTTP
livenessProbe:
httpGet:
path: /api/health
path: /api/health/liveness
port: 8080
scheme: HTTP
initialDelaySeconds: 60
Expand Down
10 changes: 0 additions & 10 deletions adjective/.nodeshift/route.yml

This file was deleted.

9 changes: 1 addition & 8 deletions adjective/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
const path = require('path');

const express = require('express');
const probe = require('kube-probe');
const port = process.env.PORT || 8080;

const app = express();
Expand All @@ -14,17 +13,11 @@ app.use('/api', api(express.Router()));

// add health check endpoint
const health = (req, res) => res.json({ status: 'OK' });
probe(app, {
livenessURL: '/api/health',
livenessCallback: health
});
require('kube-probe')(app);

// add swagger API docs
app.use('/api-docs', swaggerUi.serve,
swaggerUi.setup(require('./lib/adjective.json')));

// serve licenses/licenses.html from the file system
app.use('/licenses', express.static(path.join(__dirname, 'licenses')));

app.listen(port);
console.log(`adjective service listening on ${port}`);
Loading

0 comments on commit ebabdf3

Please sign in to comment.