mirror of
https://github.com/janishutz/MusicPlayer.git
synced 2026-09-10 14:25:24 +02:00
chore: fix startup of backend
This commit is contained in:
@@ -4,6 +4,8 @@ import fs from 'fs';
|
|||||||
import jwt from 'jsonwebtoken';
|
import jwt from 'jsonwebtoken';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
|
|
||||||
|
const run = () => {
|
||||||
const app = express();
|
const app = express();
|
||||||
|
|
||||||
app.use( expressSession( {
|
app.use( expressSession( {
|
||||||
@@ -52,3 +54,8 @@ app.use( ( _request: express.Request, response: express.Response ) => {
|
|||||||
const PORT = process.env.PORT || 8080;
|
const PORT = process.env.PORT || 8080;
|
||||||
|
|
||||||
app.listen( PORT );
|
app.listen( PORT );
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
run
|
||||||
|
};
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ const configure = ( location: 'stderr' | 'file', minLevel: LogLevel, file?: stri
|
|||||||
throw new Error( 'File parameter required when location is "file"' );
|
throw new Error( 'File parameter required when location is "file"' );
|
||||||
}
|
}
|
||||||
|
|
||||||
loc = location === 'stderr' ? 'stderr' : file;
|
loc = location === 'stderr' ? 'stderr' : ( file ?? 'musicplayer.log' );
|
||||||
lev = levels.indexOf( minLevel );
|
lev = levels.indexOf( minLevel );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
|
"rootDir": "./src",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"target": "ES6",
|
"target": "ES6",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"types": ["node"],
|
"types": [
|
||||||
|
"node"
|
||||||
|
],
|
||||||
"module": "NodeNext",
|
"module": "NodeNext",
|
||||||
"moduleResolution": "NodeNext"
|
"moduleResolution": "NodeNext"
|
||||||
},
|
},
|
||||||
"include": [ "./src/**/*" ],
|
"include": [
|
||||||
|
"./src/**/*"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user