Skip to content

Instantly share code, notes, and snippets.

@raytiley
Created September 16, 2016 20:55
Show Gist options
  • Save raytiley/0977c7617d2b8a5ce856ad339b7c4899 to your computer and use it in GitHub Desktop.
Save raytiley/0977c7617d2b8a5ce856ad339b7c4899 to your computer and use it in GitHub Desktop.
var FastBootServer = require('ember-fastboot-server');
var express = require('express');
var server = new FastBootServer({
distPath: '../fastboot-dist'
});
var app = express();
app.get('/*', server.middleware());
app.use(function(req, res, next) {
res.status(404).send('Sorry cant find that!');
});
var listener = app.listen(process.env.PORT || 3000, function() {
var host = listener.address().address;
var port = listener.address().port;
});
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="index.js" verb="*" modules="iisnode" />
</handlers>
<iisnode loggingEnabled="true" />
<rewrite>
<rules>
<rule name="hello">
<match url="/*" />
<action type="Rewrite" url="index.js" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment