redirect root to status.im site
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
0dd5915fd8
commit
86b1688217
|
@ -21,6 +21,10 @@ const App = ({ghc, schema}) => {
|
|||
.use(router.middleware())
|
||||
.use(BodyParser({onerror:console.error}))
|
||||
|
||||
router.get('/', async (ctx) => {
|
||||
ctx.redirect('https://status.im/')
|
||||
})
|
||||
|
||||
router.get('/health', async (ctx) => {
|
||||
ctx.body = 'OK'
|
||||
})
|
||||
|
|
|
@ -19,6 +19,14 @@ describe('App', () => {
|
|||
app = App({ghc})
|
||||
})
|
||||
|
||||
describe('GET /', () => {
|
||||
it('should redirect to main site', async () => {
|
||||
const resp = await request(app.callback()).get('/')
|
||||
expect(resp.status).to.eq(302)
|
||||
expect(resp.headers.location).to.eq('https://status.im/')
|
||||
})
|
||||
})
|
||||
|
||||
describe('GET /health', () => {
|
||||
it('should return OK', async () => {
|
||||
const resp = await request(app.callback())
|
||||
|
|
Loading…
Reference in New Issue