Last active
December 25, 2018 20:22
-
-
Save elgreatly/1baee4ee798fc23b5ef3be739f615b17 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: 'https://render.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