Skip to content

Instantly share code, notes, and snippets.

@joshtrigger
Last active April 11, 2020 00:15

Revisions

  1. joshtrigger revised this gist Apr 11, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions server.js
    Original file line number Diff line number Diff line change
    @@ -2,9 +2,9 @@ const express = require('express');
    const app = express();
    const path = require('path');

    app.use(express.static(__dirname + '/dist/travis-CI-and-CD'));
    app.use(express.static(__dirname + '/dist/<app-name>'));
    app.get('*', (req, res) => {
    res.sendFile(path.join(__dirname + '/dist/travis-CD-and-CD/index.html'));
    res.sendFile(path.join(__dirname + '/dist/<app-name>/index.html'));
    });

    app.listen(process.env.PORT || 5000);
  2. joshtrigger created this gist Apr 7, 2020.
    10 changes: 10 additions & 0 deletions server.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    const express = require('express');
    const app = express();
    const path = require('path');

    app.use(express.static(__dirname + '/dist/travis-CI-and-CD'));
    app.get('*', (req, res) => {
    res.sendFile(path.join(__dirname + '/dist/travis-CD-and-CD/index.html'));
    });

    app.listen(process.env.PORT || 5000);