diff --git a/server.js b/server.js index 2e386d0b041..284ed2aef19 100644 --- a/server.js +++ b/server.js @@ -5,13 +5,74 @@ var path = require('path'); var app = express(); app.use(morgan('combined')); +var articleone={ + title:"article one by sagar bhaltilak", + heading:"article-one", + date:"aug 5 2017", + content:` +

+ This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this. +

+

+ This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this. +

+

+ This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this. +

`}; + + function createTemplate(data){ + var title=data.title; + var date=data.date; + var heading=data.heading; + var content=data.content; + var htmlTemplate=` + + ${title} + + + + +
+
+ home +
+
+

${heading}

+
+ ${date} +
+
+ ${content} +
+
+ +`; + +return htmlTemplate; +} + app.get('/', function (req, res) { res.sendFile(path.join(__dirname, 'ui', 'index.html')); }); +app.get('/article-one',function(req,res){ +res.send(createTemplate(articleone)); +}); + +app.get('/article-two',function(req,res){ +res.sendFile(path.join(__dirname, 'ui', 'article-two.html')); +}); + +app.get('/article-three',function(req,res){ +res.sendFile(path.join(__dirname, 'ui', 'article-three.html')); +}); + app.get('/ui/style.css', function (req, res) { res.sendFile(path.join(__dirname, 'ui', 'style.css')); }); +app.get('/ui/main.js', function (req, res) { + res.sendFile(path.join(__dirname, 'ui', 'main.js')); +}); app.get('/ui/madi.png', function (req, res) { res.sendFile(path.join(__dirname, 'ui', 'madi.png')); @@ -25,3 +86,4 @@ var port = 80; app.listen(port, function () { console.log(`IMAD course app listening on port ${port}!`); }); + diff --git a/ui/article-one.html b/ui/article-one.html new file mode 100644 index 00000000000..dcd1e030803 --- /dev/null +++ b/ui/article-one.html @@ -0,0 +1,30 @@ + + + Article one + + + + +
+
+ home +
+
+

Article-one

+
+ aug 21 2017 +
+
+

+ This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this. +

+

+ This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this. +

+

+ This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this. +

+
+
+ + diff --git a/ui/article-three.html b/ui/article-three.html new file mode 100644 index 00000000000..f6a72c8e432 --- /dev/null +++ b/ui/article-three.html @@ -0,0 +1,30 @@ + + + Article three + + + + +
+
+ home +
+
+

Article-three

+
+ aug 21 2017 +
+
+

+ This is my three article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this. +

+

+ This is my three article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this. +

+

+ This is my three article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this. +

+
+
+ + diff --git a/ui/article-two.html b/ui/article-two.html new file mode 100644 index 00000000000..0d5c4d51936 --- /dev/null +++ b/ui/article-two.html @@ -0,0 +1,30 @@ + + + Article two + + + + +
+
+ home +
+
+

Article-two

+
+ aug 21 2017 +
+
+

+ This is my second article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this. +

+

+ This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this. +

+

+ This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this.This is my first article and i am feeling great to do this. +

+
+
+ + diff --git a/ui/index.html b/ui/index.html index 5a28644db45..d890f61127a 100644 --- a/ui/index.html +++ b/ui/index.html @@ -9,8 +9,14 @@
- Hi! I am your webapp. + Hi! I am sagar and this is my first web app.
+

+ its looking good

+
+ diff --git a/ui/style.css b/ui/style.css index 71a5f6acc1e..ba95ddbdffa 100644 --- a/ui/style.css +++ b/ui/style.css @@ -19,4 +19,13 @@ body { .img-medium { height: 200px; } +.container + { + max-width:800px; + margin:0 auto; + color:grey; + font-family:sans-serif; + padding-top:60px; + padding-left:20px; + }