Ahmad Schinner commited on
Commit
83ed759
·
verified ·
1 Parent(s): 10a683f

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +6 -1
index.js CHANGED
@@ -194,9 +194,14 @@ app.get('/whois', async (req, res) => {
194
  }
195
  });
196
 
 
 
 
 
 
197
  //404 not found
198
  app.get('*', (req, res) => {
199
- res.status(404).send('Page not found');
200
  })
201
 
202
  app.listen(port, async () => {
 
194
  }
195
  });
196
 
197
+ // default router
198
+ app.get('/', (req, res) => {
199
+ res.status(200).json({ success: true });
200
+ })
201
+
202
  //404 not found
203
  app.get('*', (req, res) => {
204
+ res.status(404).json({error: 'Page not found'});
205
  })
206
 
207
  app.listen(port, async () => {