@@ -11,46 +11,3 @@ var server = app.listen(process.env.PORT || 5000, function () {
1111 console . log ( 'Express app listening at http://%s:%s' , host , port )
1212
1313} )
14- // var express = require('express');
15- // var app = express();
16- // const port = 5000;
17- // const path = require('path');
18- // var bodyParser = require("body-parser");
19- // app.use(bodyParser.json({type: 'application/json'}));
20- //
21- // //app.use(bodyParser.json());
22- //
23- // console.log("Starting server");
24- //
25- // app.use(express.static(path.join(__dirname + '/img')));
26- // app.use(express.static(path.join(__dirname + '/css')));
27- // app.use(express.static(path.join(__dirname + '/js')));
28- // app.use(express.static(path.join(__dirname + '/node_modules')));
29- // app.use(express.static(path.join(__dirname + '/data')));
30- //
31- // // Allow cross origin
32- // app.use(function(req, res, next) {
33- // res.header("Access-Control-Allow-Origin", "*");
34- // res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
35- // next();
36- // });
37- //
38- // app.set('port', port);
39- //
40- // //View engine for rendering html
41- // var engine = require('consolidate');
42- // app.engine('html', engine.mustache);
43- // app.set('view engine', 'html');
44- //
45- // app.get('/', function(req, res) {
46- // console.log("starting request")
47- // res.render(path.join(__dirname + '/index.html'));
48- // });
49- //
50- //
51- //
52- //
53- // app.listen(port, function() {
54- // console.log("You've been served!")
55- // console.log("Node app is running at localhost:" + app.get('port'))
56- // });
0 commit comments