Server IP : 103.11.96.170 / Your IP : 3.145.170.67 Web Server : Microsoft-IIS/10.0 System : Windows NT WIN-F6SLGVICLOP 10.0 build 17763 (Windows Server 2016) AMD64 User : elibrary.unsap.ac.id ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF Directory (0777) : D:/localhost/dev_admission/baileys-api-master/src/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
import cors from 'cors'; import 'dotenv/config'; import express from 'express'; import routes from './routes'; import { init } from './wa'; const app = express(); app.use(cors()); app.use(express.json()); app.use('/', routes); app.all('*', (req, res) => res.status(404).json({ error: 'URL not found' })); const host = process.env.HOST || '0.0.0.0'; const port = Number(process.env.PORT || 3000); const listener = () => console.log(`Server is listening on http://${host}:${port}`); (async () => { await init(); app.listen(port, host, listener); })();