Sunday 13 May 2018

Set up server, localhost not recognizing javascript/css files

Hey everyone! Started digging through node yesterday because I wanted to work with an API for this small web app I want to make. I can get the API data fine through node and understand using sockets to transport that data, but I am having issues now when I run my index.html through localhost:8080, my issues through the console are:Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/style.css".Uncaught SyntaxError: Unexpected token < jquery.csv.js:1Uncaught SyntaxError: Unexpected token < client.js:1The client.js is where I have all of my jquery/js and jquery.csv.js is a library Im using to easily parse csv files (which is what I need for this project).Does anyone have any idea what's going? I've been working on this project all weekend and have searched stackoverflow endlessly. All of these files are within the same directory. This is how I set the external file links in my html:I have also tried appending http://localhost:8080/ to the front of the scripts/css but that hasn't worked as well. Please help this noob get over this hurdle lol, any help would definitely be appreciated.For reference, my server file's code: https://ift.tt/2IBi2XU

Submitted May 13, 2018 at 05:35PM by enebeme_

No comments:

Post a Comment