Skip to content

demo #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
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