Created
December 21, 2018 19:20
-
-
Save elgreatly/667541976c0ef0e2fab9b6362aa5eeab to your computer and use it in GitHub Desktop.
app.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var path = require('path'); | |
var favicon = require('serve-favicon'); | |
var logger = require('morgan'); | |
var bodyParser = require('body-parser'); | |
var http = require('http'); | |
const fetch = require('node-fetch'); | |
const url = require('url'); | |
const rendertron = require('rendertron-middleware'); | |
var app = express(); | |
app.use(rendertron.makeMiddleware({ | |
proxyUrl: 'http://www.example.com/render', | |
})); | |
app.use(express.static(path.join(__dirname, 'dist'))); | |
app.use('*', express.static(path.join(__dirname, 'dist'))); | |
module.exports = app; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment