Created
May 18, 2016 13:27
-
-
Save pimterry/d88989aa8e47c36622354af058965f37 to your computer and use it in GitHub Desktop.
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 fs = require("fs"); | |
var express = require("express"); | |
var components = require("server-components"); | |
require("./linkify-example-component.js"); | |
require("./google-analytics-example-component.js"); | |
var html = fs.readFileSync("index.html"); | |
var app = express(); | |
app.get('/', function (req, res) { | |
components.renderPage(html).then((output) => { | |
res.send(output); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment