mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 17:43:58 +01:00
fix: electron file path
This commit is contained in:
parent
89acd32564
commit
a5e08af456
|
@ -106,7 +106,9 @@ const createServer = () => {
|
|||
const server = http.createServer((request, response) => {
|
||||
// Get the file path from the URL
|
||||
let filePath =
|
||||
request.url === '/' ? '../dist/index.html' : `../dist/${request.url}`;
|
||||
request.url === '/'
|
||||
? `${path.join(__dirname, '../dist/index.html')}`
|
||||
: `${path.join(__dirname, `../dist/${request.url}`)}`;
|
||||
|
||||
// Get the file extension from the filePath
|
||||
let extname = path.extname(filePath);
|
||||
|
|
Loading…
Reference in a new issue