Spaces:
Paused
Paused
| 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}`) | |
| }) |