const express = require("express");
const https = require("https");
const bodyParser = require("body-parser");




const app = express();

// app.use(csv);
app.use(bodyParser.urlencoded({extended: true}));
app.use(express.static("public"));

app.get("/Streamlines", function(req,res){
    // res.send("<h1>Hallo Streamlines!</h1>");    
    res.sendFile(__dirname + "/iStoeckStreams.html");
});


// app.get("/", function(req,res){
//     // res.send("<h1>Hallo Streamlines!</h1>");    
//     res.sendFile(__dirname + "/iStoeckStreams.html");
// });

app.get("/", function(req,res){
    // res.send("<h1>Hallo Streamlines!</h1>");    
    res.sendFile(__dirname + "/index.html");
});



app.get("/StoeckachPointCloud", function(req,res){
    // res.send("<h1>Hallo Streamlines!</h1>");    
    res.sendFile(__dirname + "/iStoeck.html");
});


app.get("/Hexgrid", function(req,res){
    // res.send("<h1>Hallo Streamlines!</h1>");    
    res.sendFile(__dirname + "/iStoeckHM.html");
});

app.get("/HexgridGeoJSON", function(req,res){
    // res.send("<h1>Hallo Streamlines!</h1>");    
    res.sendFile(__dirname + "/iStoeckHMGeoJSON.html");
});

app.get("/WindowDetectorEssen", function(req,res){
    // res.send("<h1>Hallo Streamlines!</h1>");    
    res.sendFile(__dirname + "/EssenPC.html");
});


app.get("/StreamlinesMultipart", function(req,res){
    // res.send("<h1>Hallo Streamlines!</h1>");    
    res.sendFile(__dirname + "/StreamlinesMultipart.html");
});

app.get("/Hexgrid2mTiles", function(req,res){
    // res.send("<h1>Hallo Streamlines!</h1>");    
    res.sendFile(__dirname + "/iStoeckHexgrid_2m.html");
});

app.get("/Hexgrid2m", function(req,res){
    // res.send("<h1>Hallo Streamlines!</h1>");    
    res.sendFile(__dirname + "/iStoeckHexgrid_2m.html");
});



app.listen(process.env.PORT || 3000, function() {    // for real deployment on an internet server OR on local server
    console.log("server is listening on port 3000");
  });
