mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
feat: startup script for loading discordbot
This commit is contained in:
parent
9f54c6c9e6
commit
50bd98d91e
@ -40,4 +40,4 @@ RUN yarn build
|
||||
RUN yarn build
|
||||
|
||||
# Running the app
|
||||
CMD "yarn" "start"
|
||||
CMD './startup.sh'
|
||||
@ -2,9 +2,11 @@ import { NextApiRequest, NextApiResponse } from 'next'
|
||||
import nc from 'next-connect'
|
||||
|
||||
import ResponseWrapper from '@utils/ResponseWrapper'
|
||||
import { getMainGuild } from '@utils/DiscordBot'
|
||||
|
||||
const HelloWorld = nc<NextApiRequest, NextApiResponse>()
|
||||
.get(async(_req, res) => {
|
||||
getMainGuild() // Load Discord Bot
|
||||
return ResponseWrapper(res, { code: 200, message: '>_<' })
|
||||
})
|
||||
|
||||
|
||||
1
startup.sh
Normal file
1
startup.sh
Normal file
@ -0,0 +1 @@
|
||||
yarn start & (sleep 1; wget http://localhost:3000/api -O /dev/null)
|
||||
Loading…
x
Reference in New Issue
Block a user