try creating health check

This commit is contained in:
Cassie Tarakajian 2018-08-21 17:39:34 -04:00
parent a8a008dd82
commit 02456eaa60
2 changed files with 8 additions and 0 deletions

View file

@ -57,4 +57,8 @@ spec:
memory: 100Mi memory: 100Mi
ports: ports:
- containerPort: 8000 - containerPort: 8000
readinessProbe:
httpGet:
path: /health
port: 8000

View file

@ -33,6 +33,10 @@ import { get404Sketch } from './views/404Page';
const app = new Express(); const app = new Express();
const MongoStore = connectMongo(session); const MongoStore = connectMongo(session);
app.get('/health', (req, res) => {
return res.json({success: true});
});
// For basic auth, in setting up beta editor // For basic auth, in setting up beta editor
if (process.env.BASIC_USERNAME && process.env.BASIC_PASSWORD) { if (process.env.BASIC_USERNAME && process.env.BASIC_PASSWORD) {
app.use(basicAuth({ app.use(basicAuth({