const express = require(‘express’);
const app = express()
app.listen(3000) app.get(‘/’, (req,res)=>{ res.send(‘hola mundo’) }) console.log(‘servidor conectado al puerto 3000’)
webview: “took too long to respond.” https://subirimagenes.hectorsilva3.repl.co
Put app.listen(3000) after the app.get statement. Run kill 1 in the shell and refresh the page
app.listen(3000)
app.get
kill 1
Hi @hectorsilva3 welcome to Ask.
Your code is incorrect… I fixed it (with some help lol)
const express = require('express'); const app = express(); app.get('/', (req, res) => { res.send('hola mundo'); }); app.listen(3000, () => { console.log('servidor conectado al puerto 3000'); });
The “took too long to respond” error sometimes happens because of Replit. Sometimes, it happens randomly, in that case, try refreshing/restarting/deleting cache. When that happens to me, I just wait it out (and refresh again and again).