forked from acemilyalcin/sample-node-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
25 lines (17 loc) · 684 Bytes
/
app.js
File metadata and controls
25 lines (17 loc) · 684 Bytes
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
/*
GEREKLİ PAKETLER YÜKLENİYOR...
*/
var http = require('http');
var express = require('express');
var app = express();
app.set('port', process.env.PORT || 3005); // GİRİŞ PORTU AYARLANDI
app.set('views', __dirname + '/app/server/views'); // VIEW KLASÖRÜ TANITILDI
app.set('view engine', 'ejs'); // VIEW ENGINE AYARLANDI
app.use(express.static(__dirname + '/app/public')); // KULLANICILAR TARAFINDAN ERİŞİLEBİLEN KLASÖR TANIMLANDI
require('./app/routes')(app); // ROUTE DOSYASI ÇAĞIRILDI
/*
HTTP SERVER OLUŞTURULDU
*/
http.createServer(app).listen(app.get('port'), function(){
console.log('Sistem ' + app.get('port') + ' Portu Üzerinde Çalışıyor.');
});