-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Description
I cloned the project and fired up the index.html. The environment loads, but the Data doesn't because the browser's Cross Origin Security Policy blocks it from loading.
So I wrote a simple Node Script which can be used as the entry point of the server instead.
So instead of launching index.html, people can launch the Script and get http://localhost:8080, then everything works flawlessly.
The script (stays in the root directory) is:
server.js
process.chdir (__dirname);
var app = require ('express') (),
serveStatic = require ('serve-static');
app
.use (serveStatic (__dirname))
.listen (process.env.NODE_ENV || 8080, function () {
console.log ('Ready');
});
Do you think it will be a good idea to upload the above server.js & Package.json on this repository for the ease of others?
Metadata
Metadata
Assignees
Labels
No labels