2022-12-15 10:14:42 +00:00
|
|
|
const express = require('express');
|
|
|
|
|
|
|
|
const PORT = 8900;
|
|
|
|
const HOST = '0.0.0.0';
|
|
|
|
|
|
|
|
const instanceNumber = Math.floor(Math.random() * 101);
|
|
|
|
|
|
|
|
const app = express();
|
|
|
|
|
|
|
|
app.get('/', (req, res) => {
|
2022-12-24 20:30:56 +00:00
|
|
|
res.send(`node-test instance ${instanceNumber}, your IP: ${req.ip}`);
|
2022-12-15 10:14:42 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
app.listen(PORT, HOST, () => {
|
|
|
|
console.log(`Server started on http://${HOST}:${PORT}`);
|
|
|
|
});
|