Skip to content

Commit 7f8243a

Browse files
committed
24.03.2022T00:43am update
1 parent 46c7b23 commit 7f8243a

File tree

152 files changed

+19644
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+19644
-16
lines changed

app.js

+17-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,28 @@ const express = require('express');
22

33
const app = express();
44

5-
const port = process.env.PORT || 3000;
5+
//Tamplate engine
6+
app.set('view engine', 'ejs');
7+
8+
//Middlewares
9+
app.use(express.static('public'));
610

11+
const port = process.env.PORT || 3000;
712

13+
//Routes
814
app.get('/', (req, res) => {
9-
res.status(200).send('Hello World!');
15+
res.status(200).render('index', {
16+
page_name: 'index',
17+
});
1018
});
1119

20+
app.get('/about', (req, res) => {
21+
res.status(200).render('about', {
22+
page_name: 'about',
23+
});
24+
});
25+
26+
1227
app.listen(port, () => {
1328
console.log(`Listening on port ${port}`);
1429
});

package-lock.json

+36-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"author": "Emre Yilmaz",
1515
"license": "ISC",
1616
"dependencies": {
17+
"ejs": "^3.1.6",
1718
"express": "^4.17.3"
1819
},
1920
"devDependencies": {

public/css/animate.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/css/animate.min.css

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)