Working on the config file
It's kind of working? Well, the program crashes due to a promise failure.
This commit is contained in:
+2
-2
@@ -26,11 +26,11 @@ app.use('/api/accounts', require('./accounts'));
|
||||
app.use('/api/admin', require('./admin'));
|
||||
|
||||
//send static files
|
||||
app.use('/', express.static(path.resolve(__dirname, 'public')));
|
||||
app.use('/', express.static(path.resolve(__dirname, '..', 'public')));
|
||||
|
||||
//fallback to the index file
|
||||
app.get('*', (req, res) => {
|
||||
res.sendFile(path.resolve(__dirname, 'public' , 'index.html'));
|
||||
res.sendFile(path.resolve(__dirname, '..', 'public' , 'index.html'));
|
||||
});
|
||||
|
||||
//startup
|
||||
|
||||
Reference in New Issue
Block a user