Skip to content
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

hari #68

Open
wants to merge 133 commits into
base: master
Choose a base branch
from
Open

hari #68

Changes from 1 commit
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
d3ea5e8
[imad-console] Updates ui/index.html
coco98 Sep 16, 2016
f0e1fbb
Made some changes locally
coco98 Sep 16, 2016
f726846
[imad-console] Updates server.js
coco98 Sep 17, 2016
5185b6e
Create article-one.html
coco98 Sep 17, 2016
89681e3
[imad-console] Updates server.js
coco98 Sep 17, 2016
b9f57f4
[imad-console] Updates ui/article-one.html
coco98 Sep 17, 2016
ca2569b
[imad-console] Updates ui/article-one.html
coco98 Sep 17, 2016
f1fe8b4
Create article-two.html
coco98 Sep 17, 2016
b84ceb8
Create article-three.html
coco98 Sep 17, 2016
f4342f1
[imad-console] Updates server.js
coco98 Sep 17, 2016
73e3ae4
[imad-console] Updates ui/article-one.html
coco98 Sep 17, 2016
74db34a
[imad-console] Updates ui/article-one.html
coco98 Sep 17, 2016
9ccddc9
[imad-console] Updates ui/article-three.html
coco98 Sep 17, 2016
b0416dd
[imad-console] Updates ui/article-two.html
coco98 Sep 17, 2016
78e87d9
[imad-console] Updates ui/article-three.html
coco98 Sep 17, 2016
c4bb47a
[imad-console] Updates ui/article-two.html
coco98 Sep 17, 2016
49ddbef
[imad-console] Updates ui/article-three.html
coco98 Sep 17, 2016
b9ae3fc
[imad-console] Updates ui/style.css
coco98 Sep 17, 2016
d855a9b
[imad-console] Updates ui/article-one.html
coco98 Sep 17, 2016
d1cf3bc
[imad-console] Updates ui/article-two.html
coco98 Sep 17, 2016
1ac69de
[imad-console] Updates server.js
coco98 Sep 17, 2016
7a59284
[imad-console] Updates ui/style.css
coco98 Sep 17, 2016
7a6265a
[imad-console] Updates server.js
coco98 Sep 17, 2016
aab0fa0
[imad-console] Updates server.js
coco98 Sep 17, 2016
c53428d
Delete article-one.html
coco98 Sep 17, 2016
8ebf6f7
Delete article-two.html
coco98 Sep 17, 2016
98573cb
Delete article-three.html
coco98 Sep 17, 2016
e8b88c0
[imad-console] Updates server.js
coco98 Sep 20, 2016
95d64cb
[imad-console] Updates ui/index.html
coco98 Sep 20, 2016
37de981
[imad-console] Updates server.js
coco98 Sep 20, 2016
3664053
[imad-console] Updates ui/index.html
coco98 Sep 20, 2016
7f5ab96
[imad-console] Updates ui/main.js
coco98 Sep 20, 2016
4c8d5e9
[imad-console] Updates ui/index.html
coco98 Sep 20, 2016
e1bb15e
[imad-console] Updates ui/main.js
coco98 Sep 20, 2016
4d42d7a
[imad-console] Updates ui/main.js
coco98 Sep 20, 2016
02d61ac
[imad-console] Updates ui/main.js
coco98 Sep 20, 2016
95110e2
[imad-console] Updates ui/main.js
coco98 Sep 20, 2016
9c25a10
[imad-console] Updates ui/index.html
coco98 Sep 21, 2016
8ccc23c
[imad-console] Updates ui/index.html
coco98 Sep 21, 2016
80d55cd
[imad-console] Updates server.js
coco98 Sep 21, 2016
22758f2
[imad-console] Updates ui/index.html
coco98 Sep 21, 2016
48f0d88
[imad-console] Updates ui/main.js
coco98 Sep 21, 2016
eba3c47
[imad-console] Updates ui/main.js
coco98 Sep 21, 2016
781472e
[imad-console] Updates ui/main.js
coco98 Sep 21, 2016
f264913
[imad-console] Updates ui/main.js
coco98 Sep 21, 2016
69da610
[imad-console] Updates ui/main.js
coco98 Sep 21, 2016
1783d0a
[imad-console] Updates ui/index.html
coco98 Sep 21, 2016
55b8ad5
[imad-console] Updates ui/index.html
coco98 Sep 21, 2016
e7141d4
[imad-console] Updates ui/main.js
coco98 Sep 21, 2016
d847ea4
[imad-console] Updates server.js
coco98 Sep 21, 2016
cb9e88c
[imad-console] Updates server.js
coco98 Sep 21, 2016
28e1ea1
[imad-console] Updates server.js
coco98 Sep 21, 2016
3bef1bc
[imad-console] Updates server.js
coco98 Sep 21, 2016
a1643e4
[imad-console] Updates server.js
coco98 Sep 21, 2016
222cf9d
[imad-console] Updates server.js
coco98 Sep 21, 2016
c0f3fd1
[imad-console] Updates ui/main.js
coco98 Sep 21, 2016
0fa2f9a
[imad-console] Updates ui/main.js
coco98 Sep 21, 2016
3c9b82f
[imad-console] Updates server.js
coco98 Oct 22, 2016
b369c59
[imad-console] Updates server.js
coco98 Oct 22, 2016
dc09cb0
[imad-console] Updates server.js
coco98 Oct 22, 2016
e85d9e0
[imad-console] Updates server.js
coco98 Oct 22, 2016
b16f2af
[imad-console] Updates server.js
coco98 Oct 22, 2016
920225e
[imad-console] Updates server.js
coco98 Oct 22, 2016
43fe343
[imad-console] Updates server.js
coco98 Oct 22, 2016
a38dd5f
[imad-console] Updates server.js
coco98 Oct 22, 2016
d7ce820
[imad-console] Updates server.js
coco98 Nov 2, 2016
383908b
[imad-console] Updates server.js
coco98 Nov 2, 2016
6181493
[imad-console] Updates server.js
coco98 Nov 3, 2016
e327c73
[imad-console] Updates server.js
coco98 Nov 3, 2016
5114886
[imad-console] Updates server.js
coco98 Nov 3, 2016
09d33f5
[imad-console] Updates server.js
coco98 Nov 3, 2016
4f2faa2
[imad-console] Updates server.js
coco98 Nov 3, 2016
3c4125a
[imad-console] Updates ui/index.html
coco98 Nov 3, 2016
4b07e90
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
bea2ecf
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
f81465f
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
0731884
[imad-console] Updates server.js
coco98 Nov 3, 2016
a98a4e2
[imad-console] Updates server.js
coco98 Nov 3, 2016
8725b8b
[imad-console] Updates server.js
coco98 Nov 3, 2016
b199c72
[imad-console] Updates server.js
coco98 Nov 3, 2016
5084656
[imad-console] Updates server.js
coco98 Nov 3, 2016
60a0372
[imad-console] Updates ui/index.html
coco98 Nov 3, 2016
7b3a45c
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
7405780
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
d87bb9a
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
ac26fa4
[imad-console] Updates ui/index.html
coco98 Nov 3, 2016
ea45541
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
d27640b
[imad-console] Updates ui/index.html
coco98 Nov 3, 2016
127de7c
[imad-console] Updates server.js
coco98 Nov 3, 2016
f51d2ae
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
3be99db
[imad-console] Updates server.js
coco98 Nov 3, 2016
647b6d0
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
fd04629
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
425206b
[imad-console] Updates server.js
coco98 Nov 3, 2016
d837038
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
cd35019
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
9bfd041
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
4533fb0
[imad-console] Updates server.js
coco98 Nov 3, 2016
0b0c056
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
645886e
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
44d4183
[imad-console] Updates ui/index.html
coco98 Nov 3, 2016
5bc2da9
[imad-console] Updates server.js
coco98 Nov 3, 2016
8d11f6d
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
61cdd94
[imad-console] Updates ui/index.html
coco98 Nov 3, 2016
6b4c484
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
2b91c12
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
ded9e4b
[imad-console] Updates ui/index.html
coco98 Nov 3, 2016
18cdcff
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
9314e56
Create article.js
coco98 Nov 3, 2016
35120aa
[imad-console] Updates ui/article.js
coco98 Nov 3, 2016
969c0bb
[imad-console] Updates ui/article.js
coco98 Nov 3, 2016
3c5add9
[imad-console] Updates ui/article.js
coco98 Nov 3, 2016
c6513a6
[imad-console] Updates server.js
coco98 Nov 3, 2016
c136e61
[imad-console] Updates server.js
coco98 Nov 3, 2016
8d6bec1
[imad-console] Updates server.js
coco98 Nov 3, 2016
853afdc
[imad-console] Updates ui/style.css
coco98 Nov 3, 2016
e42dba8
[imad-console] Updates ui/article.js
coco98 Nov 3, 2016
f0f65b0
[imad-console] Updates server.js
coco98 Nov 3, 2016
f72324c
[imad-console] Updates ui/article.js
coco98 Nov 3, 2016
a839197
[imad-console] Updates ui/style.css
coco98 Nov 3, 2016
4033324
[imad-console] Updates ui/article.js
coco98 Nov 3, 2016
727f87e
[imad-console] Updates ui/article.js
coco98 Nov 3, 2016
3794ac0
[imad-console] Updates server.js
coco98 Nov 3, 2016
3708e00
[imad-console] Updates ui/article.js
coco98 Nov 3, 2016
8722b13
[imad-console] Updates server.js
coco98 Nov 3, 2016
b479575
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
6c85b3c
[imad-console] Updates ui/main.js
coco98 Nov 3, 2016
bc40132
[imad-console] Updates ui/article.js
coco98 Nov 3, 2016
0b36095
[imad-console] Updates ui/article.js
coco98 Nov 3, 2016
f89207b
[imad-console] Updates ui/article.js
coco98 Nov 3, 2016
84b0ce7
Adds schema
coco98 Nov 3, 2016
ba56e59
[imad-console] Updates server.js
coco98 Nov 19, 2016
5cd93d4
Update server.js
coco98 Nov 21, 2016
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
Prev Previous commit
Next Next commit
[imad-console] Updates server.js
  • Loading branch information
coco98 committed Sep 17, 2016
commit 7a6265a1b31c905706c379144e07ab4f5c692453
62 changes: 38 additions & 24 deletions server.js
Original file line number Diff line number Diff line change
@@ -6,20 +6,40 @@ var app = express();
app.use(morgan('combined'));


var articleOne = {
title: 'Article One | Tanmai Gopal',
heading: 'Article One',
date: 'Sep 5, 2016',
content: `
<p>
This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article.
</p>
<p>
This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article.
</p>
<p>
This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article.
</p>`
var articles = {
'article-one': {
title: 'Article One | Tanmai Gopal',
heading: 'Article One',
date: 'Sep 5, 2016',
content: `
<p>
This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article.
</p>
<p>
This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article.
</p>
<p>
This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article. This is the content for my first article.
</p>`
},
'article-two': {
title: 'Article Two | Tanmai Gopal',
heading: 'Article Two',
date: 'Sep 10, 2016',
content: `
<p>
This is the content for my second article.
</p>`
},
'article-three': {
title: 'Article Three | Tanmai Gopal',
heading: 'Article Three',
date: 'Sep 15, 2016',
content: `
<p>
This is the content for my third article.
</p>`
}
};

function createTemplate (data) {
@@ -63,16 +83,10 @@ 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('/:articleName', function (req, res) {
// articleName == article-one
// articles[articleName] == {} content object for article one
res.send(createTemplate(articles[articleName]));
});

app.get('/ui/style.css', function (req, res) {