WEBVTT

1
00:00:01.639 --> 00:00:04.640
Now, I did actually switch the project here.

2
00:00:05.040 --> 00:00:10.700
I went back to this Node.js Express project I started working on in the previous course

3
00:00:10.700 --> 00:00:16.900
section, and it's this project where I now want to explore some other chat-related features

4
00:00:16.900 --> 00:00:18.100
offered by Cursor.

5
00:00:19.849 --> 00:00:24.540
For example, its Docs feature, which is really neat and convenient.

6
00:00:26.000 --> 00:00:34.380
Let's say here in this application, in this Node application, I have a public folder that

7
00:00:34.380 --> 00:00:41.800
contains some content, some images, whatever, that should be served publicly, statically,

8
00:00:41.940 --> 00:00:47.260
you could say, which means if this web server here, this Node.js Express web server would

9
00:00:47.260 --> 00:00:52.540
be up and running, requests to any files in the public folder should directly be forwarded

10
00:00:52.440 --> 00:00:57.480
to these files and these files should be served back to the visitors without any other steps

11
00:00:57.480 --> 00:00:57.940
involved.

12
00:00:59.400 --> 00:01:07.240
Now to add this code, we could use a chat instruction, add code to serve files from

13
00:01:07.959 --> 00:01:12.440
public folder statically, and it would probably work.

14
00:01:14.360 --> 00:01:22.580
But to be sure, we can bring in some Docs and refer to the Express Docs, which is the

15
00:01:22.580 --> 00:01:25.800
documentation of the Express.js library I'm using here.

16
00:01:26.860 --> 00:01:29.620
And Cursor is aware of many Docs.

17
00:01:29.820 --> 00:01:36.140
If you go to Docs, you'll see there are lots of Docs, well, it's not scrollable, but there

18
00:01:36.080 --> 00:01:46.180
are lots of Docs here for React, for AWS stuff, for Django if you're doing Python development,

19
00:01:47.240 --> 00:01:53.080
for all these popular libraries essential, for Node.js itself, everything's here.

20
00:01:54.860 --> 00:01:59.240
But if something were not here, you could also add a new Doc and just copy in a link

21
00:01:59.240 --> 00:02:04.660
to some documentation web page and the content of that page would be considered for future

22
00:02:04.660 --> 00:02:05.280
responses.

23
00:02:05.720 --> 00:02:06.760
That's an amazing feature.

24
00:02:08.340 --> 00:02:11.100
Here I'll just use the Express documentation.

25
00:02:11.720 --> 00:02:14.780
So I'll go to Docs and use the Express documentation.

26
00:02:16.240 --> 00:02:21.160
And then hit generate to hopefully get some code that does the trick.

27
00:02:23.420 --> 00:02:25.720
Yeah, so this wasn't too difficult.

28
00:02:26.040 --> 00:02:27.520
It adds the right code here.

29
00:02:29.000 --> 00:02:35.160
But this documentations feature where you can add extra resources to your chat prompts

30
00:02:35.160 --> 00:02:41.040
as context for these prompts, that's a super amazing feature because that also ensures

31
00:02:41.040 --> 00:02:48.620
that if you're using Cursor with some relatively new or lesser known package, you can bring

32
00:02:48.620 --> 00:02:53.620
in that extra documentation knowledge and Cursor has a higher chance of generating good

33
00:02:53.620 --> 00:02:54.060
code.

34
00:02:55.160 --> 00:02:58.620
Because that's often the problem with AI models.

35
00:02:58.840 --> 00:03:05.620
They're trained on old data, so if you're working with a new library, with a new package,

36
00:03:05.900 --> 00:03:09.260
the model might not know it or not know it that well.

37
00:03:10.380 --> 00:03:14.480
Well, you can bring in the extra documentation to solve that problem.

38
00:03:14.640 --> 00:03:17.340
So that is an amazing feature offered by Cursor.

