nodejs-webrtcsignalexchange.../index.js

31 lines
575 B
JavaScript
Raw Normal View History

/**
* Project main module
*
* @author Pierre HUBERT
*/
/**
* Import requirements
*/
const express = require("express");
const app = express();
const WebSocket = require("ws");
/**
* Import project modules
*/
const config = require("./config");
/**
* If user tries to connect to home page,
* show a message to explains him what is the
* purpose of this service
*/
app.get("/", (req, res) => {
res.send("Welcome to NodeSignalExchanger!");
});
var server = app.listen(config.port, () => {
console.log("Application listening on port " + config.port);
})