diff --git a/server.js b/server.js index 3d5cece3abd..0bab262305e 100644 --- a/server.js +++ b/server.js @@ -5,8 +5,89 @@ var path = require('path'); var app = express(); app.use(morgan('combined')); +var articles = { + 'article-one': { + title: 'Article one | Ila Amaresan', + heading: 'Article one', + date: 'Nov 1, 2016', + content: `
This is content for article one. This is content for article one. This is content for article one. + This is content for article one. This is content for article one. This is content for article one. + This is content for article one. This is content for article one. This is content for article one. +
+ +This is content for article one. This is content for article one. This is content for article one. + This is content for article one. This is content for article one. This is content for article one. + This is content for article one. This is content for article one. This is content for article one. +
+ +This is content for article one. This is content for article one. This is content for article one. + This is content for article one. This is content for article one. This is content for article one. + This is content for article one. This is content for article one. This is content for article one. +
` + }, + 'article-two': { + title: 'Article two | Ila Amaresan', + heading: 'Article two', + date: 'Nov 2, 2016', + content: ` ++ This is the content for article two. +
` + }, + 'article-three': { + title: 'Article 3 | Ila Amaresan', + heading: 'Article 3', + date: 'Nov 3, 2016', + content: 'This is article three content' + } +}; + +function createTemplate (data) { + var title = data.title; + var date = data.date; + var heading = data.heading; + var content = data.content; + var htmlTemplate = ` + + +Article one | +Article two | +Article three | +Error Page | +