Tamamdir.
var http = require('http');
var fs=require('fs');
var homeController = function(req,res){
fs.readFile('login.html',function(err,data){
res.write(data);
res.end('Mesaj bittii');
});
}
var loginController = function(req,res){
fs.readFile('index.html',function(err,data){
res.write(data);
res.end('');
});
}
var server = http.createServer(function(req,res){
if(req.url=="/login"){
homeController(req,res);
}
if(req.url=="/"){
loginController(req,res);
}
})
server.listen(5500);
-------
index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="css/style.css">
<style>
body{
overflow-x:hidden;
}
.blogName{
color
range;
font-size:35px;
font-weight: bold;
margin-left:15px;
margin-top:-5px;
transition: 300ms all;
}
.blogName:hover{
font-size:36px;
}
.stick{
width:2700px;
margin-left:-7px;
margin-top:-45px;
}
.searchBox{
position:relative;
top:-58px;
left:730px;
width:400px;
border-radius: 4px;
border-color:teal;
}
.login{
position:relative;
background-color: #00FFFF;
border-radius: 6px;
color:white;
width:55px;
border-width: 0px;
height:30px;
top:-50px;
left:1750px;
transition: 400ms all;
font-style: italic;
font-weight: bold;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.login:hover{
width:60px;
height:35px;
}
</style>
</head>
<body>
<div class="upPart">
<p class="blogName">cBlog</p>
<input class="searchBox" type="text">
<hr class="stick">
<button class="login">Login</button>
</div>
</body>
</html>
proje içindeki bağımlılıkların sayısı fazla olabilir.
Nasıl.