TerrileJ / SortingVisualizer

0 stars 0 forks source link

Encountering CORS issue when running code locally #1

Open SanbornPNguyen opened 11 months ago

SanbornPNguyen commented 11 months ago

When running locally on Google Chrome, I'm encountering a CORS issue which isn't causing the JavaScript files to be loaded properly.

Possible fix: https://stackoverflow.com/questions/70416741/cors-error-cannot-access-assets-folder-in-parent-directory-from-index-html

SanbornPNguyen commented 10 months ago

I investigated further and it looks like importing app.js as a module from index.html is causing the issue. I suggest moving the javascript for the sorting into a webserver so we avoid CORS issue from loading everything locally. Reference: https://stackoverflow.com/questions/50197495/javascript-modules-and-cors