Beginning server-side rendering support

This commit is contained in:
SteveSandersonMS
2016-02-07 21:41:00 -08:00
parent 5811c98230
commit 9c16c7da3d
15 changed files with 208 additions and 47 deletions

View File

@@ -0,0 +1,13 @@
import isomorphicFetch from 'isomorphic-fetch';
import { addTask } from './domain-tasks';
export function fetch(url: string): Promise<any> {
// TODO: Find some way to supply the base URL via domain context
var promise = isomorphicFetch('http://localhost:5000' + url, {
headers: {
Connection: 'keep-alive'
}
});
addTask(promise);
return promise;
}