I'm struggling with my code setup. Essentially, I have the following piece of code:
var express = require('express');
var app = express();
var server = require('http').Server(app);
app.get('/', function(req,res){
res.sendfile(__dirname + '/index.html');
});
server.listen(3000);
The issue is that only my index.html page is loading properly, while encountering a GET error for all my other files. Even when I try to load the index.html at localhost:3000, my main.js and app.css files are not found according to the console errors. I've attempted to include the other files as sources in the html file too, but they still won't load. It seems like this problem occurs because I am sending just one html file to the server. How can I adjust this set up to ensure that all necessary files are successfully sent to the server?