Spaces:
Running
Running
Ahmad Schinner
commited on
Update index.js
Browse files
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).
|
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 () => {
|