Skip to content

Commit 7bf978e

Browse files
committed
pathfix
1 parent 1943ca2 commit 7bf978e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/app.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ if (httpsRedirect) app.use(httpToHttps)
3535
* подключение статической библиотеки клиента
3636
*/
3737
if (!devMode) {
38-
app.use('/', express.static(path.join(__dirname, '../client', 'build')))
38+
const clientPath = '../client/build'
39+
app.use('/', express.static(path.join(__dirname, clientPath)))
3940
app.get('*', (req, res) => {
40-
res.sendFile(path.resolve(__dirname, '../client', 'build', 'index.html'))
41+
res.sendFile(path.resolve(__dirname, clientPath, 'index.html'))
4142
})
4243
} else {
4344
app.get('*', (req, res) => {

0 commit comments

Comments
 (0)