1
00:00:02,150 --> 00:00:03,390
So as a next step,

2
00:00:03,390 --> 00:00:06,700
let's make sure it is View Post button works

3
00:00:06,700 --> 00:00:09,233
and takes us to the post detail page.

4
00:00:10,430 --> 00:00:12,290
For this, we have to add a link to it

5
00:00:12,290 --> 00:00:13,210
because at the moment,

6
00:00:13,210 --> 00:00:16,490
this link doesn't have any actual link.

7
00:00:16,490 --> 00:00:19,450
If we go to the post item EJS file,

8
00:00:19,450 --> 00:00:21,410
it's this anchor element,

9
00:00:21,410 --> 00:00:24,840
which doesn't have a value for the href attribute,

10
00:00:24,840 --> 00:00:26,840
at least not a valid one.

11
00:00:26,840 --> 00:00:28,960
And we of course have to add a fitting route

12
00:00:28,960 --> 00:00:31,530
and then all the logic to that route.

13
00:00:31,530 --> 00:00:34,210
Now let's maybe start with defining the link,

14
00:00:34,210 --> 00:00:36,950
the path here to which you wanna link.

15
00:00:36,950 --> 00:00:40,060
And that could be a slash posts

16
00:00:40,060 --> 00:00:44,320
and then the ID of this specific post.

17
00:00:44,320 --> 00:00:49,320
So that we actually will use a dynamic path, a dynamic URL,

18
00:00:49,810 --> 00:00:53,170
which is a little bit different for the different posts,

19
00:00:53,170 --> 00:00:55,730
having the different post IDs in it,

20
00:00:55,730 --> 00:00:59,620
but generally of course, it's always the same structure.

21
00:00:59,620 --> 00:01:01,410
So once we register our route,

22
00:01:01,410 --> 00:01:04,080
we'll work with a dynamic route parameter

23
00:01:04,080 --> 00:01:07,150
to store and grab that ID.

24
00:01:07,150 --> 00:01:12,150
Here in the place where we define the path we wanna link to,

25
00:01:12,480 --> 00:01:15,310
we of course, wanna use EJS here

26
00:01:15,310 --> 00:01:19,660
to inject a dynamic value into our HTML code,

27
00:01:19,660 --> 00:01:22,620
so that for every post item that's being output,

28
00:01:22,620 --> 00:01:25,220
we generate a different link.

29
00:01:25,220 --> 00:01:29,863
And we want to add the depost ID here with post.id.

30
00:01:31,930 --> 00:01:34,890
This will ensure that the post ID is part of this path

31
00:01:34,890 --> 00:01:37,810
and therefore if I go back after saving this

32
00:01:37,810 --> 00:01:39,470
and I reload this page.

33
00:01:39,470 --> 00:01:43,960
Now, if I hover over the you post in the bottom left corner,

34
00:01:43,960 --> 00:01:48,398
I can see that this would lead to /posts/1

35
00:01:48,398 --> 00:01:53,398
for the first post and /posts/2 for the second post.

36
00:01:54,700 --> 00:01:56,040
So that's looking good.

37
00:01:56,040 --> 00:01:59,610
Now we just need to make sure that we actually handle

38
00:01:59,610 --> 00:02:02,260
those incoming requests on the server side

39
00:02:02,260 --> 00:02:04,960
and that we return the appropriate template

40
00:02:04,960 --> 00:02:08,639
or that we render the appropriate template.

41
00:02:08,639 --> 00:02:12,000
And for this in our block.js routes file,

42
00:02:12,000 --> 00:02:14,650
we wanna register a new route.

43
00:02:14,650 --> 00:02:17,240
Now that we have all those existing routes,

44
00:02:17,240 --> 00:02:19,040
it's time for a brand new one.

45
00:02:19,040 --> 00:02:22,130
And here we want to handle a get request again,

46
00:02:22,130 --> 00:02:26,490
because if we click a link, a get request will be sent

47
00:02:26,490 --> 00:02:30,370
and we wanna target /posts/

48
00:02:30,370 --> 00:02:34,710
and then the ID will be different for the different posts.

49
00:02:34,710 --> 00:02:39,000
So that screams for a dynamic route with route parameters.

50
00:02:39,000 --> 00:02:41,950
And you'll learn that we can implement this easily

51
00:02:41,950 --> 00:02:44,400
with express by adding colon,

52
00:02:44,400 --> 00:02:47,100
and then any identifier of our choice,

53
00:02:47,100 --> 00:02:50,880
like post ID or just ID.

54
00:02:50,880 --> 00:02:55,113
I'll go for just ID here, but this identifier is up to you.

55
00:02:56,890 --> 00:03:01,120
Then the second value here, the second parameter again

56
00:03:01,120 --> 00:03:04,260
is our function that will be executed for

57
00:03:04,260 --> 00:03:06,050
an incoming request.

58
00:03:06,050 --> 00:03:09,160
And in this function, we now of course,

59
00:03:09,160 --> 00:03:13,150
wanna fetch the data for this specific post.

60
00:03:13,150 --> 00:03:17,440
Again, also fetch the author data that belongs to it

61
00:03:17,440 --> 00:03:20,300
because in the template which we will see in the render,

62
00:03:20,300 --> 00:03:22,930
I also wanna show the name of the author

63
00:03:22,930 --> 00:03:26,200
and use the email of the author,

64
00:03:26,200 --> 00:03:28,963
and then of course, we wanna render the template.

65
00:03:29,940 --> 00:03:32,950
Now let's start with rendering the template actually

66
00:03:32,950 --> 00:03:34,840
for this, we can use res render

67
00:03:34,840 --> 00:03:37,260
and the template I do want to render here

68
00:03:37,260 --> 00:03:40,300
is post-detail.

69
00:03:40,300 --> 00:03:43,203
So this post detail EJS file,

70
00:03:44,730 --> 00:03:46,770
but of course we need some data

71
00:03:46,770 --> 00:03:50,690
to regularly have a useful template being rendered.

72
00:03:50,690 --> 00:03:53,460
And for this, we wanna again, construct a query

73
00:03:53,460 --> 00:03:56,850
and since it will again, be a little bit of a longer query

74
00:03:56,850 --> 00:04:00,950
or again, use a standalone constant, and then the back ticks

75
00:04:00,950 --> 00:04:04,650
so that I can split my query across multiple lines.

76
00:04:04,650 --> 00:04:06,410
Simply just for readability sake,

77
00:04:06,410 --> 00:04:09,423
since this will also be a little bit of a longer query here.

78
00:04:10,830 --> 00:04:13,330
Now that being said, let's start writing it.

79
00:04:13,330 --> 00:04:15,190
Of course you wanna select some data.

80
00:04:15,190 --> 00:04:17,310
We wanna fetch some data

81
00:04:17,310 --> 00:04:21,019
and I wanna select everything from posts,

82
00:04:21,019 --> 00:04:23,280
but of course not for all the posts.

83
00:04:23,280 --> 00:04:27,040
I wanna fetch all the data, but not for all the posts.

84
00:04:27,040 --> 00:04:29,853
Therefore we'll also need a WHERE clause,

85
00:04:30,950 --> 00:04:33,150
because this route is about fetching the data

86
00:04:33,150 --> 00:04:36,170
for a single post for a specific post.

87
00:04:36,170 --> 00:04:38,300
And hence with a WHERE clause,

88
00:04:38,300 --> 00:04:41,670
we can narrow down the amount of records we wanna fetch,

89
00:04:41,670 --> 00:04:43,750
and we can also adjust the fetch one single post,

90
00:04:43,750 --> 00:04:44,633
if we want to.

91
00:04:45,710 --> 00:04:48,070
So with that, here we can add WHERE,

92
00:04:48,070 --> 00:04:50,420
and we wanna fetch all the posts

93
00:04:50,420 --> 00:04:53,640
where id is equal to one specific id,

94
00:04:53,640 --> 00:04:55,040
which of course means that in the end

95
00:04:55,040 --> 00:04:57,203
it will only be one post.

96
00:04:58,130 --> 00:05:01,780
So here, then we wanna say WHERE id =

97
00:05:01,780 --> 00:05:06,260
and I will again, add a question mark here as a placeholder,

98
00:05:06,260 --> 00:05:08,970
because I wanna inject that ID dynamically

99
00:05:08,970 --> 00:05:12,860
it will be the ID from my URL in the end.

100
00:05:12,860 --> 00:05:14,120
That means that,

101
00:05:14,120 --> 00:05:18,390
here if we wanna execute this with DB query

102
00:05:18,390 --> 00:05:20,290
using the query method again,

103
00:05:20,290 --> 00:05:23,820
we pass our query which we defined in the query constant

104
00:05:23,820 --> 00:05:26,070
as a first parameter value.

105
00:05:26,070 --> 00:05:28,910
And then as you learn it for inserting

106
00:05:28,910 --> 00:05:32,460
it's all to the same for fetching data with select,

107
00:05:32,460 --> 00:05:35,520
we can pass a second parameter value to query,

108
00:05:35,520 --> 00:05:37,840
which is an array of all the values

109
00:05:37,840 --> 00:05:40,780
that should be injected into our query string,

110
00:05:40,780 --> 00:05:42,970
into our query command here.

111
00:05:42,970 --> 00:05:46,780
So replacements for those question marks.

112
00:05:46,780 --> 00:05:49,130
And here, I only have one question mark,

113
00:05:49,130 --> 00:05:51,950
so I only need one value in this array.

114
00:05:51,950 --> 00:05:56,950
And that one value here will be rec.params.id.

115
00:05:58,290 --> 00:06:00,970
That's how we extract the concrete value

116
00:06:00,970 --> 00:06:04,520
of that ID placeholder from the path

117
00:06:04,520 --> 00:06:06,303
for which this route was loaded.

118
00:06:07,660 --> 00:06:11,280
So here, if we visited the first post ID would be one,

119
00:06:11,280 --> 00:06:13,160
for the second post, it would be two

120
00:06:13,160 --> 00:06:17,430
and the value one or two would be extracted from the URL

121
00:06:17,430 --> 00:06:20,040
and would then be passed as a value

122
00:06:20,040 --> 00:06:23,240
instead of this question mark into tbis query string.

123
00:06:23,240 --> 00:06:24,733
That's how this would work.

124
00:06:27,080 --> 00:06:30,360
Now with that, however, of course we're not done yet.

125
00:06:30,360 --> 00:06:33,380
This would fetch us to a single post, but as I mentioned,

126
00:06:33,380 --> 00:06:36,490
I'm also interested in the author data.

127
00:06:36,490 --> 00:06:38,780
Therefore we wanna join our posts

128
00:06:38,780 --> 00:06:42,440
with the author data from the authors' table.

129
00:06:42,440 --> 00:06:45,640
And hence we keep the WHERE clause here,

130
00:06:45,640 --> 00:06:47,240
but before we add it,

131
00:06:47,240 --> 00:06:50,260
since it has to come at the end, as you learned,

132
00:06:50,260 --> 00:06:54,360
we add INNER JOIN and JOIN our authors table

133
00:06:54,360 --> 00:06:59,360
ON posts.author_id being equal to authors.id.

134
00:07:04,220 --> 00:07:05,860
And then here for the WHERE clause,

135
00:07:05,860 --> 00:07:09,360
we can actually also change that to posts.id,

136
00:07:09,360 --> 00:07:11,950
to make it clear that here we're looking for the ID

137
00:07:11,950 --> 00:07:15,773
in the posts table, not the ID in the author's table.

138
00:07:17,220 --> 00:07:20,140
And with that, we're joining in the authors data.

139
00:07:20,140 --> 00:07:22,470
And now I also wanna change

140
00:07:22,470 --> 00:07:25,220
the concrete columns I'm fetching.

141
00:07:25,220 --> 00:07:28,230
I wanna get all the columns from posts,

142
00:07:28,230 --> 00:07:30,970
but when it comes to the author data,

143
00:07:30,970 --> 00:07:34,120
I wanna fetch authors.name

144
00:07:34,120 --> 00:07:36,550
and give that alias off author_name

145
00:07:38,220 --> 00:07:40,670
and separated by another comma.

146
00:07:40,670 --> 00:07:42,790
I also wanna fetch the email,

147
00:07:42,790 --> 00:07:44,797
but as the author_email.

148
00:07:48,170 --> 00:07:51,670
Again, using these aliases is totally optional,

149
00:07:51,670 --> 00:07:55,000
I'm just doing it here so that in the template later,

150
00:07:55,000 --> 00:07:58,543
it will be clear which kind of data we're accessing there.

151
00:07:59,630 --> 00:08:01,670
But with that, we're fetching the post data

152
00:08:01,670 --> 00:08:04,160
and the merged in author data,

153
00:08:04,160 --> 00:08:06,300
the name and the email to be precise.

154
00:08:06,300 --> 00:08:08,653
And therefore that should do the trick.

155
00:08:09,780 --> 00:08:12,870
As always, this is a asynchronous operation.

156
00:08:12,870 --> 00:08:15,830
Running that query is an asynchronous operation

157
00:08:15,830 --> 00:08:19,080
and hence we wanna use, async await here

158
00:08:19,080 --> 00:08:22,710
to wait for that result like this.

159
00:08:22,710 --> 00:08:26,360
And again, result is an array with two items.

160
00:08:26,360 --> 00:08:29,560
The first item are our fetched records,

161
00:08:29,560 --> 00:08:31,570
the second item is the metadata.

162
00:08:31,570 --> 00:08:33,740
I'm not interested in the metadata,

163
00:08:33,740 --> 00:08:35,650
but I'm interested in the first item.

164
00:08:35,650 --> 00:08:38,919
And therefore, again, I use array de-structuring

165
00:08:38,919 --> 00:08:41,323
to get my posts here.

166
00:08:42,289 --> 00:08:47,290
And I deliberately named this posts instead of just post,

167
00:08:47,370 --> 00:08:51,150
because even though we know it will only be one post

168
00:08:51,150 --> 00:08:53,100
that meets this criteria,

169
00:08:53,100 --> 00:08:55,340
technically it could be more than one

170
00:08:55,340 --> 00:08:58,960
because it's just a select query with a WHERE clause.

171
00:08:58,960 --> 00:09:02,390
So the MySQL package doesn't know ahead of time

172
00:09:02,390 --> 00:09:05,190
that we'll only have one matching record here

173
00:09:05,190 --> 00:09:07,500
and hence it will return us an array here,

174
00:09:07,500 --> 00:09:11,630
which then just turns out to only hold one item.

175
00:09:11,630 --> 00:09:14,220
But that's something we as a developer know

176
00:09:14,220 --> 00:09:15,650
the package doesn't know it,

177
00:09:15,650 --> 00:09:18,530
and hence you always get back an array here

178
00:09:18,530 --> 00:09:20,040
and hence I name it posts,

179
00:09:20,040 --> 00:09:23,040
because that makes it clear that this is an array of posts,

180
00:09:23,040 --> 00:09:25,153
even though it will only hold one post.

181
00:09:27,720 --> 00:09:29,260
Now here to my template,

182
00:09:29,260 --> 00:09:31,720
I then wanna forward that one single post,

183
00:09:31,720 --> 00:09:33,520
which I know I will have,

184
00:09:33,520 --> 00:09:35,700
and that will simply be the first item

185
00:09:35,700 --> 00:09:38,590
I find in this post array.

186
00:09:38,590 --> 00:09:42,023
Because again, we know there will only be one item in there.

187
00:09:43,570 --> 00:09:47,500
Technically though, we might not even have that one item

188
00:09:47,500 --> 00:09:51,500
because of what if a user manually enters a URL

189
00:09:51,500 --> 00:09:55,300
with an idea of a post that doesn't exist.

190
00:09:55,300 --> 00:09:58,513
Then posts wouldn't have any posts at all.

191
00:09:59,670 --> 00:10:03,140
So to handle that case that we don't get back any data,

192
00:10:03,140 --> 00:10:06,790
I'll actually check if posts has maybe on the find

193
00:10:06,790 --> 00:10:09,763
or if posts.length ===0,

194
00:10:10,900 --> 00:10:13,380
which means we didn't find any posts

195
00:10:13,380 --> 00:10:18,380
and then dad case, I don't wanna render this template here.

196
00:10:18,480 --> 00:10:23,290
Instead in that case, I want to actually set my status code

197
00:10:23,290 --> 00:10:28,290
on the response to 404 to signal a 404 not found error

198
00:10:29,210 --> 00:10:32,713
and render my 404 template which I prepared.

199
00:10:33,960 --> 00:10:37,080
And it will actually add a return keyword here

200
00:10:37,080 --> 00:10:40,440
so that the code thereafter won't be executed.

201
00:10:40,440 --> 00:10:41,410
That's also something

202
00:10:41,410 --> 00:10:44,090
we discussed earlier in the course already.

203
00:10:44,090 --> 00:10:46,960
Without return, this line would execute,

204
00:10:46,960 --> 00:10:49,770
and this line would also still execute.

205
00:10:49,770 --> 00:10:52,460
We could wrap it in an l statement alternatively,

206
00:10:52,460 --> 00:10:56,330
but if we never do that, nor add a return statement here,

207
00:10:56,330 --> 00:10:59,630
then this line line 51 would also execute

208
00:10:59,630 --> 00:11:02,910
and we would basically try to send two responses,

209
00:11:02,910 --> 00:11:04,193
which doesn't work.

210
00:11:05,270 --> 00:11:08,010
So simply adding return here does a trick

211
00:11:08,010 --> 00:11:11,730
and ensures that this code in line 51, doesn't execute

212
00:11:11,730 --> 00:11:13,963
if this line executed already.

213
00:11:15,260 --> 00:11:16,093
And with that,

214
00:11:16,093 --> 00:11:20,550
we should handle the case that we did not find a post.

215
00:11:20,550 --> 00:11:22,030
And alternatively,

216
00:11:22,030 --> 00:11:26,233
we do render this template with data about this single post.

217
00:11:27,360 --> 00:11:30,170
And therefore we cannot go to that template

218
00:11:30,170 --> 00:11:32,613
and adjust what we output there.

219
00:11:33,690 --> 00:11:37,890
In this template, it actually all starts here at the top

220
00:11:37,890 --> 00:11:40,500
with the title of the post.

221
00:11:40,500 --> 00:11:43,330
That's the title that's shown on the browser tab

222
00:11:43,330 --> 00:11:45,640
and that would show up in search engines

223
00:11:45,640 --> 00:11:47,030
and here, instead of having

224
00:11:47,030 --> 00:11:49,960
this hard coded post title placeholder,

225
00:11:49,960 --> 00:11:52,450
I wanna have to concrete posts title,

226
00:11:52,450 --> 00:11:56,013
which we can here by simply accessing post.title.

227
00:11:57,230 --> 00:11:59,460
Post because in block.js,

228
00:11:59,460 --> 00:12:03,853
I'm setting this post key, which is exposed to the template.

229
00:12:05,750 --> 00:12:07,500
Now, that's the first step.

230
00:12:07,500 --> 00:12:09,860
I also wanna I would put the post title here

231
00:12:09,860 --> 00:12:11,410
between the h1 tags

232
00:12:11,410 --> 00:12:15,830
and if we're here, it's also post title, like that.

233
00:12:19,090 --> 00:12:21,170
Now in this meta section,

234
00:12:21,170 --> 00:12:25,720
I actually wanna output the author name and the date.

235
00:12:25,720 --> 00:12:28,030
And that's maybe something you didn't do

236
00:12:28,030 --> 00:12:31,320
if you try this on your own and that's absolutely fine,

237
00:12:31,320 --> 00:12:32,740
but here I wanna show you

238
00:12:32,740 --> 00:12:36,370
one possible way of outputting that extra metadata

239
00:12:36,370 --> 00:12:37,573
in a clean way.

240
00:12:38,840 --> 00:12:40,340
For the author name,

241
00:12:40,340 --> 00:12:44,370
I'll use the special address, HTML element.

242
00:12:44,370 --> 00:12:47,150
This is a standard HTML element,

243
00:12:47,150 --> 00:12:48,750
which typically should be used

244
00:12:48,750 --> 00:12:52,200
if you're outputting some address information.

245
00:12:52,200 --> 00:12:56,190
And address does not just mean the address of a house

246
00:12:56,190 --> 00:12:57,530
or anything like that,

247
00:12:57,530 --> 00:12:59,690
but it could also be the email address,

248
00:12:59,690 --> 00:13:02,083
often author of a block post.

249
00:13:03,180 --> 00:13:04,650
So therefore address is great,

250
00:13:04,650 --> 00:13:08,300
whenever you have contact details or anything like this,

251
00:13:08,300 --> 00:13:10,510
and then for an address, I'll add a link

252
00:13:11,830 --> 00:13:13,970
which should show the author name

253
00:13:13,970 --> 00:13:16,810
and then automatically open the mail client

254
00:13:16,810 --> 00:13:20,570
with an email to that author being composed.

255
00:13:20,570 --> 00:13:24,430
And that can be achieved by adding mailto here,

256
00:13:24,430 --> 00:13:28,240
this special keyword, if you wanna call it like this

257
00:13:28,240 --> 00:13:30,660
and the then inserting the email address

258
00:13:30,660 --> 00:13:33,210
to which emails should be composed.

259
00:13:33,210 --> 00:13:34,840
This will not send it automatically,

260
00:13:34,840 --> 00:13:36,913
it will just open the mail client.

261
00:13:38,340 --> 00:13:40,370
So for this here, I then use EJS

262
00:13:40,370 --> 00:13:43,910
to output posts.author_email author_email,

263
00:13:47,190 --> 00:13:50,550
because that's the alias I assigned here

264
00:13:50,550 --> 00:13:52,533
when we fetched that data.

265
00:13:54,710 --> 00:13:56,650
And then here between the opening

266
00:13:56,650 --> 00:13:59,880
and closing anchor elements, I wanna show the actual text,

267
00:13:59,880 --> 00:14:02,300
the actual name of the author.

268
00:14:02,300 --> 00:14:05,763
So for that here, we can access post.author_name,

269
00:14:06,645 --> 00:14:10,200
author_name was another alias

270
00:14:10,200 --> 00:14:12,283
I set up in my select statement.

271
00:14:15,830 --> 00:14:18,870
So that's the first part, adding this address,

272
00:14:18,870 --> 00:14:21,950
I'll then add a white space and then there's pipe symbol,

273
00:14:21,950 --> 00:14:25,530
which is just a regular character on the keyboard.

274
00:14:25,530 --> 00:14:27,780
And then below that,

275
00:14:27,780 --> 00:14:30,410
I will add a number of built in HTML element,

276
00:14:30,410 --> 00:14:32,730
the time element.

277
00:14:32,730 --> 00:14:36,090
Now just like address, that's a very specific element,

278
00:14:36,090 --> 00:14:36,970
which is great

279
00:14:36,970 --> 00:14:40,330
if you're outputting some date time information,

280
00:14:40,330 --> 00:14:44,490
and I wanna output the date off this blog post.

281
00:14:44,490 --> 00:14:47,573
So the creation date off that blog post here.

282
00:14:48,610 --> 00:14:51,860
And for this between the time opening and closing tax,

283
00:14:51,860 --> 00:14:56,383
I wanna output that creation date in a human readable way.

284
00:14:57,280 --> 00:15:00,800
Now for the moment let's just output post.date

285
00:15:00,800 --> 00:15:02,560
that will hold the date,

286
00:15:02,560 --> 00:15:04,460
not perfectly human readable though,

287
00:15:04,460 --> 00:15:05,910
but we'll work on that later

288
00:15:05,910 --> 00:15:08,173
but as a start, this is something we can do.

289
00:15:10,080 --> 00:15:12,440
And then here time does element

290
00:15:12,440 --> 00:15:15,610
should also take a daytime attribute.

291
00:15:15,610 --> 00:15:17,620
That's an attribute you should always add

292
00:15:17,620 --> 00:15:19,250
to this time element

293
00:15:19,250 --> 00:15:22,910
where you then output the machine readable date.

294
00:15:22,910 --> 00:15:23,840
And therefore again,

295
00:15:23,840 --> 00:15:27,810
I'll use EJS to output posts.date here as well.

296
00:15:27,810 --> 00:15:30,900
And that will then soon be a machine-readable date,

297
00:15:30,900 --> 00:15:33,520
which is basically interpreted by the browser,

298
00:15:33,520 --> 00:15:35,730
which can help assist of technologies.

299
00:15:35,730 --> 00:15:39,010
And then we've got the human readable time or a date

300
00:15:39,010 --> 00:15:42,210
between the opening and closing elements.

301
00:15:42,210 --> 00:15:45,840
So that's a little bit of extra HTML knowledge here,

302
00:15:45,840 --> 00:15:47,630
probably worth knowing as well.

303
00:15:47,630 --> 00:15:50,750
And with that, we're outputting that post metadata

304
00:15:50,750 --> 00:15:53,230
in a clean and correct way.

305
00:15:53,230 --> 00:15:55,470
Again, if you did not do it like that,

306
00:15:55,470 --> 00:15:58,370
chances are high you didn't, that's absolutely fine.

307
00:15:58,370 --> 00:16:00,120
These are new elements,

308
00:16:00,120 --> 00:16:02,373
which I didn't wanna hide from you though.

309
00:16:04,490 --> 00:16:06,490
So with that route putting the metadata,

310
00:16:06,490 --> 00:16:09,570
now as a last piece here,

311
00:16:09,570 --> 00:16:12,193
I also wanna output the actual post body.

312
00:16:13,170 --> 00:16:14,010
And for this here,

313
00:16:14,010 --> 00:16:17,750
we can actually output post.body here with help of EJS

314
00:16:17,750 --> 00:16:19,683
in that body paragraph.

315
00:16:20,560 --> 00:16:23,433
And with that we're outputting all that post data.

316
00:16:24,440 --> 00:16:27,360
If you now save all the files

317
00:16:27,360 --> 00:16:30,540
and you go back and view a single post,

318
00:16:30,540 --> 00:16:32,930
you should see something like this.

319
00:16:32,930 --> 00:16:36,230
The data is not formatted in the way I wanted yet,

320
00:16:36,230 --> 00:16:38,440
but the rest is looking good.

321
00:16:38,440 --> 00:16:40,740
I also got this clickable author text,

322
00:16:40,740 --> 00:16:43,823
and if we do click it, the male client would open up.

