File size: 465 Bytes
b9e5a76
e3fefe8
 
fca7b3f
 
e3fefe8
 
 
 
 
 
 
b9e5a76
 
fca7b3f
b9e5a76
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require('dotenv').config();
const app = require('./src/app');

const HOST = process.env.HOST || '0.0.0.0';
const PORT = Number(process.env.PORT || process.env.HF_PORT || 7860);

process.env.HOST = HOST;
process.env.PORT = String(PORT);
app.locals.host = HOST;
app.locals.port = PORT;

app.listen(PORT, HOST, () => {
  console.log(`Service Connect backend running at http://${HOST}:${PORT}`);
  console.log(`Health endpoint: http://${HOST}:${PORT}/health`);
});