-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
39 lines (31 loc) · 933 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"use strict";
/**
* Created by dmasley on 6/1/16.
*/
const express = require('express');
const net = require("net");
const app = express();
const expressWs = require('express-ws')(app);
const passport = require("passport");
// routers
const mainRouter = require("./routes/main");
const wsRouter = require("./routes/wsRouter");
const ArtShopRouter = require("./routes/artShop");
app.use(express.static('public'));
app.set("view engine", "ejs");
// var dbConfig = require('./db.js');
// var mongoose = require('mongoose');
// mongoose.connect(dbConfig.url);
app.use("/", mainRouter);
app.use("", wsRouter);
app.use("/shop", ArtShopRouter);
const server = net.createServer();
server.listen(6967);
server.on("connection", (socket)=>{
console.log('CONNECTED: ' + sock.remoteAddress +':'+ sock.remotePort);
socket.on("data", ()=>{
})
});
app.listen(8082, function () {
console.log('Listening to port: 8082');
});