-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4864cc1
Showing
7 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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.'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* | ||
STİL KODLARINI BURAYA YAZABİLİRSİNİZ. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = function(app) { | ||
|
||
app.get('/',function(req,res){ // İSTEMCİNİN '/' İSTEĞİNE KARŞILIK VEREN KOD BLOĞU | ||
res.render('index'); // INDEX VİEW DOSYASI RENDER EDİLDİ | ||
}); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="styles/styles.css" /> | ||
</head> | ||
<body> | ||
Örnek Node.js Projesi | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "sample-node-project", | ||
"version": "1.0.0", | ||
"description": "Sample Node.js Project", | ||
"main": "app.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "Adem Cemil YALCIN", | ||
"license": "ISC" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Sample Node.js Project | ||
|
||
A Node.js project written using Express. EJS was used as the view engine. | ||
|
||
# Installation | ||
|
||
You need to write the following commands on the terminal screen so that you can run the project locally. | ||
|
||
<code> | ||
git clone [email protected]:acemilyalcin/sample-node-project | ||
cd sample-node-project | ||
npm install | ||
npm start | ||
</code> | ||
|
||
The application is running on [Title](localhost:3000) |