Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

219
Views
How do I read the console log made in javascript in html?

I am making a Discord bot using Discord.js v13, and once I run the project it prints in the console.log:

Bot is on
Timestamp: [time I ran the bot]

My code to make it like that:

const Event = require("../Structures/Event.js");
const Discord = require('discord.js')
var today = new Date();
var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate()+' `'+today.getHours()+':'+today.getMinutes()+':'+today.getSeconds()+'`';
var hms = today.getHours()+':'+today.getMinutes()+':'+today.getSeconds();


module.exports = new Event("ready", client => {
    console.log(`Bot is on\nTimestamp: ${hms} `)
    client.channels.fetch("928241814639632404")
    .then(channel => {
        channel.send(`Started on ${date}`).then(sentMessage => {
            setTimeout(() => {
                sentMessage.delete()
            }, 1000);
        })
    })
    client.user.setActivity({ name: 'The World Failing', type: "WATCHING" })
    client.user.setStatus('dnd')
})

Now I also have a simple host, shown in the discordjs guide

Code in index.js:

const express = require('express')

const app = express();

app.get('/', (request, response) => {
    return response.sendFile('index.html', { root: '.' });
});

app.listen(port, () => console.log(`App listening at http://localhost:${port}`));

Code in index.html:

<!DOCTYPE html>
<html>
<head>
    <title>My Discord OAuth2 App</title>
</head>
<body>
    <div id="info">
        Hoi!
    </div>
</body>
</html>

My question is, how do I make it show on the web server when my bot started, just like it showed in the console.log?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!