mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +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
|
RUN yarn build
|
||||||
|
|
||||||
# Running the app
|
# Running the app
|
||||||
CMD "yarn" "start"
|
CMD './startup.sh'
|
||||||
@ -2,9 +2,11 @@ import { NextApiRequest, NextApiResponse } from 'next'
|
|||||||
import nc from 'next-connect'
|
import nc from 'next-connect'
|
||||||
|
|
||||||
import ResponseWrapper from '@utils/ResponseWrapper'
|
import ResponseWrapper from '@utils/ResponseWrapper'
|
||||||
|
import { getMainGuild } from '@utils/DiscordBot'
|
||||||
|
|
||||||
const HelloWorld = nc<NextApiRequest, NextApiResponse>()
|
const HelloWorld = nc<NextApiRequest, NextApiResponse>()
|
||||||
.get(async(_req, res) => {
|
.get(async(_req, res) => {
|
||||||
|
getMainGuild() // Load Discord Bot
|
||||||
return ResponseWrapper(res, { code: 200, message: '>_<' })
|
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