Размещение приложения React и Nodejs на Vultr

С папкой сборки response в корне каталога nodejs с index.js:

      const path = require('path');
const express = require('express');

const app = express();

require('./startup/config')();
require('./startup/routes')(app);
require('./startup/db')();
require('./startup/validation')();
require('./startup/prod')(app);

app.use(express.static(path.join(__dirname, 'build')));

app.get('/*', (req, res) => {
    res.sendFile(path.join(__dirname, 'build', 'index.html'));
});

const port = process.env.PORT;

const server = require('./startup/socket')(app, port);

module.exports = server;

Я получаю эту ошибку при попытке развернуть

      Loading failed for the <script> with source “https://www.example.com/static/js/runtime-main.0e11355c.js”.
Loading failed for the <script> with source “https://www.example.com/static/js/2.664acc69.chunk.js”. 
Loading failed for the <script> with source “https://www.example.com/static/js/main.5603ef9c.chunk.js”.

0 ответов

Другие вопросы по тегам