mirror of
https://gitlab.com/comunic/nodejs-webrtcsignalexchangerserver
synced 2024-11-22 05:19:26 +00:00
31 lines
575 B
JavaScript
31 lines
575 B
JavaScript
|
/**
|
||
|
* 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);
|
||
|
})
|