This repository has been archived on 2023-11-14. You can view files and clone it, but cannot push or open issues/pull-requests.
valnet/relay/index.js

31 lines
746 B
JavaScript
Raw Normal View History

2020-11-11 19:38:39 -05:00
const { title } = require('../lib/title');
const net = require('net');
2020-11-11 22:06:45 -05:00
const log = require('signale').scope('relay');
2020-11-11 19:38:39 -05:00
const { config } = require('./../package.json');
2020-11-11 22:06:45 -05:00
title('relay', false);
2020-11-11 19:38:39 -05:00
2020-11-11 21:47:54 -05:00
// let connection = null;
2020-11-11 19:38:39 -05:00
2020-11-11 21:47:54 -05:00
// (function tryConnect() {
// connection = net.createConnection(config.ports.ns, 'valnet.xyz', () => {
// log.success('Connected to name server');
// });
// connection.on('error', () => {
// log.error('Could not connect to name server')
// connection = null;
// tryConnect();
// });
// connection.on('data', (data) => {
// log.debug(data.toString());
// })
// })();
2020-11-11 22:21:35 -05:00
const express = require('express');
const app = express();
2020-11-11 21:47:54 -05:00
2020-11-11 22:21:35 -05:00
app.get('/', (req, res) => {
res.end(Date.now().toString());
})
app.listen(9999);