Currently, I'm facing the challenge of breaking down my Express app code into multiple files. Unfortunately, I am unable to utilize <link href>
or <script src>
for linking stylesheets or scripts.
Below is the relevant snippet from my index.js:
const express = require('express');
const app = express()
app.get('/', (req, res) => {
res.sendFile(__dirname + '/public/index.html');
});
The structure of my files looks like this:
.
├── index.js
└── public
├── favicon.ico
└── index.html
If anyone could offer assistance, it would be greatly appreciated. Thank you!