diff --git a/server.js b/server.js index 3d5cece3ab..98b6e1ee59 100644 --- a/server.js +++ b/server.js @@ -5,19 +5,146 @@ var path = require('path'); var app = express(); app.use(morgan('combined')); +var articlesContent={ + //javacript data structure +'article-one':{ + title:'Article One', + heading:'Article 1 |Anita MC', + content:`
This is the content.This is the content.This is the content.this is the content.This is the content.This is the content.This is the content.This is the content.This is the content. +
This is the content.This is the content.This is the content.this is the content.This is the content.This is the content.This is the +
This is the content.This is the content.This is the content.this is the content.This is the content.This is the content.This is the `}, + + 'article-two':{ + title:'Article Two', + heading:'Article 2 | Anita MC', + content:`
This is the content.This is the content.This is the content.this is the content.This is the content.This is the content.This is the content.This is the content.This is the content. +
This is the content.This is the content.This is the content.this is the content.This is the content.This is the content.This is the +
This is the content.This is the content.This is the content.this is the content.This is the content.This is the content.This is the ` + }, + 'article-three':{ + title:'Article Three', + heading:'Article 3 | Anita MC', + content:`
This is the content.This is the content.This is the content.this is the content.This is the content.This is the content.This is the content.This is the content.This is the content. +
This is the content.This is the content.This is the content.this is the content.This is the content.This is the content.This is the +
This is the content.This is the content.This is the content.this is the content.This is the content.This is the content.This is the ` + } + + +}; + +var articleFour={ + title:'Article 4', + heading1:'About me', + heading2:'About my sister', + content1:'
I am anita mc. I live in Indore.I want to be a software engineer.Thats all for today.
', + content2:'She is a very fun person to be with. really like and love her,she is my role mode. thats all.
' +}; + +function Createtemplate(data){ + var title=data.title; + var heading1=data.heading1; + var heading2=data.heading2; + var content1=data.content1; + var content2=data.content2; + + var HTMLTemplate=` + +My name is Anita MC.
I study at IIPS.
+