-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
45 lines (39 loc) · 1.09 KB
/
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
40
41
42
43
44
45
var express = require("express");
var app = express();
app.use(express.static(__dirname + '/views'));
//Store all HTML files in view folder.
app.use(express.static(__dirname + '/script'));
//Store all JS and CSS in Scripts folder.
app.get('/',function(req,res){
res.render('index.ejs');
});
app.get('/pure',function(req,res){
res.render('pure.ejs');
});
app.get('/slider',function(req,res){
res.render('slider.ejs');
});
app.get('/contact',function(req,res){
res.render('contact.ejs');
});
app.get('/news',function(req,res){
res.render('news.ejs');
});
app.get('/rena',function(req,res){
res.render('rena.ejs');
});
app.get('/recept',function(req,res){
res.render('recept.ejs');
});
app.get('/blanco',function(req,res){
res.render('blanco.ejs');
});
// app.listen(3001, process.env.IP, function() {
// app.listen(3001, process.env.IP, function() {
var portSettings = process.env.PORT
// var portSettings = 3030;
app.listen(portSettings, process.env.IP, function() {
var appConsoleMsg = 'Hemsidan startad: ';
appConsoleMsg += process.env.IP + ':' + portSettings;
console.log(appConsoleMsg);
});