diff --git a/server.js b/server.js index 2e386d0b04..c32a193841 100644 --- a/server.js +++ b/server.js @@ -5,14 +5,103 @@ var path = require('path'); var app = express(); app.use(morgan('combined')); + +var articles = { + 'article-one': { + title: 'Article one .. Im Varun', + heading: 'Article One', + date: 'August 5,2017', + content: ` +
+ This is the conent for my first article.This is the conent for my first article.This is the conent for my first article.This is the conent for my first article.This is the conent for my first article.This is the conent for my first article. +
++ This is the conent for my first article.This is the conent for my first article.This is the conent for my first article.This is the conent for my first article.This is the conent for my first article.This is the conent for my first article. +
++ This is the conent for my first article.This is the conent for my first article.This is the conent for my first article.This is the conent for my first article.This is the conent for my first article.This is the conent for my first article. +
` + }, + 'article-two': { + title: 'Article Two .. Im Varun', + heading: 'Article Two', + date: 'August 10,2017', + content: ` ++ This is the conent for my second article. +
` + + }, + 'article-three': { + title: 'Article Three .. Im Varun', + heading: 'Article Three', + date: 'August 23,2017', + content: ` ++ This is the conent for my third article. +
` + + } +}; + +function createTemplate (data) { + var title = data.title; + var date = data.date; + var heading = data.heading; + var content = data.content; + var htmlTemplate = ` + + +