ilhamdev commited on
Commit
9a3a9e5
·
verified ·
1 Parent(s): eb05b41

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +0 -4
index.js CHANGED
@@ -390,7 +390,6 @@ app.use(morgan('dev'));
390
  app.use(express.json());
391
 
392
  const v8 = require('v8');
393
- const start = Date.now()
394
 
395
  app.all('/', async (req, res) => {
396
  const status = {}
@@ -415,14 +414,11 @@ app.all('/', async (req, res) => {
415
  }
416
 
417
  const host = 'https://' + req.get('host');
418
- const end = Date.now(); // Selesai menghitung waktu
419
- const latency = Math.abs((end - start) / 1000)+ ' ms'; // Menghitung latency
420
 
421
  res.json({
422
  creator: `@${process.env['SPACE_AUTHOR_NAME'] || 'ALOK FF'}`,
423
  message: 'Hello World!',
424
  uptime: new Date(process.uptime() * 1000).toUTCString().split(' ')[4],
425
- latency,
426
  status, // Menambahkan latency ke JSON
427
  "list": [
428
  {
 
390
  app.use(express.json());
391
 
392
  const v8 = require('v8');
 
393
 
394
  app.all('/', async (req, res) => {
395
  const status = {}
 
414
  }
415
 
416
  const host = 'https://' + req.get('host');
 
 
417
 
418
  res.json({
419
  creator: `@${process.env['SPACE_AUTHOR_NAME'] || 'ALOK FF'}`,
420
  message: 'Hello World!',
421
  uptime: new Date(process.uptime() * 1000).toUTCString().split(' ')[4],
 
422
  status, // Menambahkan latency ke JSON
423
  "list": [
424
  {