PRIX / server.ts
Rachit-Tw's picture
Upload 172 files
1cf5856 verified
Raw
History Blame Contribute Delete
599 Bytes
import express, {Request, Response} from 'express'
const app = express()
const PORT = process.env.PORT || 7860
const HOST = process.env.HOST || '0.0.0.0'
app.get('/', (_req: Request, res: Response) => {
res.status(200).send('PRIX Service is Running')
})
app.get('/ping', (_req: Request, res: Response) => {
res.status(200).send('pong')
})
app.get('/health', (_req: Request, res: Response) => {
res.status(200).json({status: 'healthy', service: 'prix'})
})
app.listen(parseInt(String(PORT)), HOST, () => {
console.log(`PRIX HTTP Server running on ${HOST}:${PORT}`)
})