Skip to content
Open

demo #95

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ app.use(morgan('combined'));
app.get('/', function (req, res) {
res.sendFile(path.join(__dirname, 'ui', 'index.html'));
});
app.get('/article-one',function(req,res){
res.sendFile(path.join(__dirname, 'ui', 'article-one.html'));
});
app.get('/article-two',function(req,res){
res.send('article two is served ');
});
app.get('/article-three',function(req,res){
res.send('article three is served ');
});

app.get('/ui/style.css', function (req, res) {
res.sendFile(path.join(__dirname, 'ui', 'style.css'));
Expand Down
43 changes: 43 additions & 0 deletions ui/article-one.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<html>
<head>
<title>
article-one gayathri r nair
</title>
<style>
.container{
max-width : 800px;
margin :0 auto;
color:grey;
font-family:sans-serif;
}
</style>
</head>
<body>
<div class="container">
<div>
<a href="/">home</a>
</div>
<hr/>
<h3>
article one
</h3>
<div>
april 25 2018
</div>
<div>
<p>
this is the content
</p>
<p>
this is the content
</p>
<p>
this is the content
</p>
<p>
this is the content
</p>
</div>
</div>
</body>
</html>
6 changes: 5 additions & 1 deletion ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
</div>
<br>
<div class="center text-big bold">
Hi! I am your webapp.
Hi! I am gayathri.
this is my first app
</div>
<script>
alert("hi i am javascript");
</script>
<script type="text/javascript" src="/ui/main.js">
</script>
</body>
Expand Down