I want to use Azure CDN (which is powered by EdgeCast, apparently) to serve static content for my React + GraphQL web app.
The CDN will pull the static files from a Storage account, and Node.js will handle the GraphQL endpoint.
For the client-side routing to work properly, I need to serve /static/index.html
for all requests that don't match the static content path (/static/somefile.ext
).
I want to avoid using Node.js to serve the index.html
in this fashion:
var express = require('express');
var app = express();
app.all('*', function(req, res){
res.sendfile("index.html");
});