Skip to content

Commit

Permalink
fixed app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
katjuell committed Feb 6, 2019
2 parents 72f3b2f + aab3cf1 commit 2fad5b6
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
const express = require("express");
<<<<<<< HEAD
const express = require('express');
=======
const express = require('express');
>>>>>>> upstream/master
const app = express();
const router = express.Router();

const path = __dirname + '/views/';

const PORT = 8080;
const HOST = '0.0.0.0';
<<<<<<< HEAD
const port = 8080;
=======
const port = 8080;
>>>>>>> upstream/master

router.use(function (req,res,next) {
console.log("/" + req.method);
console.log('/' + req.method);
next();
});

router.get("/",function(req,res){
res.sendFile(path + "index.html");
router.get('/',function(req,res){
res.sendFile(path + 'index.html');
});

router.get("/sharks",function(req,res){
res.sendFile(path + "sharks.html");
router.get('/sharks',function(req,res){
res.sendFile(path + 'sharks.html');
});

app.use(express.static(path));
app.use("/", router);
app.use('/', router);

app.listen(8080, function () {
app.listen(port, function () {
console.log('Example app listening on port 8080!')
})

0 comments on commit 2fad5b6

Please sign in to comment.