Firstly Node.js powerful javascript version for servers. Node.js is used Google’s V8 javascript engine. If you want learn more information for node.js, you can use this link.
Installation
First we use this link for node.js setup.
Second we use terminal/cmd my computer is used unix system. Maybe, other platforms have a different rules. I write for unix/linux system. We will create project folder this code:
“mkdir computerLogWebPage”
Then we go to project folder and write this folder for express framework:
Express is a framework for node.js. More information is here.
And we should install express-generator with this code:
“sudo npm install -g express-generator“
and we create express project with this code:
“express blog“
Then go to blog folder and write this code:
“npm install”
This code is installed what we need.
Third we should fix index.js and add this code:
“router.get(‘/blog’, function(req, res) {
res.render(‘blog’, { title: ‘Computer Log’ });
});”
Then we create blog.jade file like this picture:
Jade like HTML.
Last we start project on localhost.
Go to terminale and write “npm start“
And open browser go to http://localhost:3000/blog