- Git Clone the repository
- This should create a CrisisReponse folder
- Scaffold out an Express app running on localhost:3000
- npm install express-generator -g
- mkdir someApp
- cd someApp
- express
- npm install
- Copy files from someApp into CrisisResponse folder (bin, node_modules, routes, views, package.json, app.js)
- Make modifications to app.js to enable CORS
var allowCrossDomain = function(req, res, next) {
res.header('Access-Control-Allow-Origin', 'example.com');
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
res.header('Access-Control-Allow-Headers', 'Content-Type');
next();
}
app.use(allowCrossDomain);
app.use(express.static(__dirname + '/public'));
- Type 'npm start' on the terminal to serves these files
- Office 365 SharePoint .ASPX page will reference files inside CrisisResponse/contentGeneration/public
- Click on the Shield icon in the Google Chrome address bar to disable security