'use strict';

import express from 'express';

const app = express();

app.get('/', function (req, res) {
  res.send('Drinkkiarkisto.');
});

app.use('/doc', express.static(__dirname + '/doc'));

export default app;

'use strict';

import express from 'express';
import { readdir } from 'fs';

const app = express();
const docPath = __dirname + '/doc';

app.get('/', function (req, res) {
  readdir(docPath, function(err, files) {
    let result = 'Drinkkiarkisto. ' + docPath + '\n';
    files.forEach(function(file) {
      result += file + '\n';
    });

    res.send(result);
  });
});

app.use('/doc', express.static(__dirname + '/doc'));

export default app;

Add a directory listing to debug heroku
Add a directory listing to debug heroku
