parent
c5eba642d0
commit
8e8df4dadc
@ -1,7 +1,13 @@ |
|||||||
const express = require('express'); |
const express = require('express'); |
||||||
const api = express(); |
|
||||||
|
|
||||||
api.get('/', (req, res) => res.send("You've reached the wubzy.xyz API. If you're looking for Natsuki's endpoints, please append /natsuki to your query.")); |
module.exports = (client) => { |
||||||
api.get('/natsuki', (req, res) => res.send("You've reached Natsuki's API. Receiving this 200 reply indicates that Natsuki is online.")); |
const api = express(); |
||||||
|
client.api = {wubzy: {}, natsuki: {}}; |
||||||
|
client.api.wubzy.app = api; |
||||||
|
|
||||||
const server = api.listen(4072, () => console.log(`Ready at ${server.address().address}:${server.address().port}`)); |
client.api.wubzy.app.get('/', (req, res) => res.send("You've reached the wubzy.xyz API. If you're looking for Natsuki's endpoints, please append /natsuki to your query.")); |
||||||
|
client.api.wubzy.app.get('/natsuki', (req, res) => res.send("You've reached Natsuki's status endpoint. Receiving this 200 reply indicates that Natsuki is online. If you're looking for the Natsuki API, it has been moved to natsuki.app")); |
||||||
|
client.api.wubzy.app.get('/natsuki/:any?', (req, res) => res.status(301).send("Natsuki's API permanently resides at natsuki.app")); |
||||||
|
|
||||||
|
client.api.wubzy.server = client.api.wubzy.app.listen(4072, () => console.log(`Ready at ${client.api.wubzy.server.address().address}:${client.api.wubzy.server.address().port}`)); |
||||||
|
}; |
Loading…
Reference in new issue