Не запускается приложение Nodejs, Express, Socket io,

Проект, Онлайн чат. Технологии: Nodejs, Express, Socket io. Приложение нужно развернуть. Пытался на heroku и на vercel.

На данный момент выдает такую ошибку.

» Error: Couldn't find that app. » » Error ID: not_found

Файл Server js

 // подключаем expres
    
        const express = require('express')
        const app = express()
    
    // протокол для сокетов
    
        const http = require('http').createServer(app)
    
    // подключаем сокет
    
        const io = require('socket.io')(http)
    
    // создаем запрос
    
        app.get('/', (req, res) => {
            res.sendFile(__dirname + '/visual/visual.html')
        })
    
    // подключаем стили
    
        app.use(express.static(__dirname + '/styles'))
    
    // подключаем lavascript код
    
        app.use(express.static(__dirname + '/main'))
        app.listen(process.env.PORT);
    
    // выполняем connection
    
        io.on('connection', (socket) => {
            socket.on('chat message', (data) => {
    
    // обрабатываем и возвращаем обратно на frontend
        
    
            io.emit('chat message', {
                    message: data.message,
                    name: data.name
                })
            })
        })
    
        http.listen(process.env.PORT || 3000, () => {
            console.log('server is running')
        })
    
    Файл Main.js
    // получаем сокет
    
        const socket = io()
    
    // получаем все элементы
    
        const messages = document.querySelector('.messages')
    
    // получаем форму
    
        const form = document.querySelector('.form')
    
    // получаем input
    
        const input = document.querySelector('.input')
    
    // получаем имя
    
        const nameBlock = document.querySelector('.name')
    
    // для внесения имени пользователя
    
        const userName = prompt('Введите Ваше имя: ')
        nameBlock.innerHTML = `${userName}`
    
    // обработка формы
    
        form.addEventListener('submit', (e) => {
            e.preventDefault()
    
        if (input.value) {
            socket.emit('chat message', {
                message: input.value,
                name: userName
            })
            input.value = ''
            }
        })
    
    // принимаем данные от сервера на фронте
    
        socket.on('chat message', (data) => {
    
    // выводим что получили от сервера
       
    
         const item = document.createElement('li')
            item.innerHTML = `<span>${data.name}</span>: ${data.message}`
    
    // выводим данные на html
    
            messages.appendChild(item)
            window.scrollTo(0, document.body.scrollHeight)
        })
    
    Файл Json
    {
      "name": "online-chat",
      "version": "1.0.0",
      "description": "",
      "main": "server.js",
      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1"
      },
      "start": "server.js",
      "keywords": [],
      "author": "",
      "license": "ISC",
      "dependencies": {
        "expres": "0.0.5",
        "socket.io": "^4.0.1"
      }
    }

Ответы (0 шт):