WEBVTT

1
00:00:01.660 --> 00:00:05.340
So, we got the sign up and log in routes.

2
00:00:05.980 --> 00:00:12.280
We of course also need some routes for registering events, editing events and so on.

3
00:00:13.560 --> 00:00:20.740
Now here I now switched to Visual Studio Code with GitHub Copilot simply so that I can show

4
00:00:20.740 --> 00:00:21.200
you both.

5
00:00:21.620 --> 00:00:28.120
Obviously I would typically stick to one of the tools, either use cursor or Visual Studio

6
00:00:28.100 --> 00:00:32.560
Code with GitHub Copilot, but for this course I want to show you both, so that's why I switched.

7
00:00:34.220 --> 00:00:39.440
And as a next step I want to add more routes here, some event specific routes.

8
00:00:39.760 --> 00:00:43.440
Hence I'll add an events.js file in the routes folder.

9
00:00:44.880 --> 00:00:50.920
And then of course here, with GitHub Copilot enabled, I can also of course open the chat

10
00:00:52.320 --> 00:01:00.060
and ask questions here or do it in line in a file, like here in events.js, where I can

11
00:01:00.060 --> 00:01:14.500
ask Copilot to add some event specific routes which can be used to create events, edit an

12
00:01:15.340 --> 00:01:20.320
event, identified by ID or delete an event.

13
00:01:23.160 --> 00:01:25.580
Use ESM imports exports.

14
00:01:26.020 --> 00:01:31.740
I'm adding this here since I switched and I'm not sure if it's aware of the general

15
00:01:31.740 --> 00:01:34.400
import export style I'm using in other files.

16
00:01:36.020 --> 00:01:41.020
Now with that, let's see what I'll get here, if that's enough for it.

17
00:01:44.479 --> 00:01:46.180
Yeah, it's okay.

18
00:01:46.920 --> 00:01:49.180
I'll accept it, but I'll need to tweak it.

19
00:01:50.200 --> 00:01:53.680
The import looks good, that looks good, that of course makes no sense.

20
00:01:53.940 --> 00:01:59.080
We have a database, but GitHub Copilot doesn't know here because I'm just in this one file.

21
00:02:00.000 --> 00:02:03.780
It doesn't have knowledge about the other files here, at least at the point of time

22
00:02:03.780 --> 00:02:06.280
where I'm recording this with this inline chat.

23
00:02:07.760 --> 00:02:12.640
In this chat here, I could have added my workspace as a reference to make it aware

24
00:02:12.640 --> 00:02:18.060
of it, but in the inline and in file chat right now, it's not aware of the entire code

25
00:02:18.060 --> 00:02:18.320
base.

26
00:02:19.220 --> 00:02:21.120
So I didn't know about that.

27
00:02:21.520 --> 00:02:28.460
Hence, I'll remove this part here and simplify those routes so that it's really just extracting

28
00:02:28.460 --> 00:02:32.160
event data and then we'll have to do something with that.

29
00:02:33.840 --> 00:02:41.100
All this code here where it tries to read some event and so on, all that actually can

30
00:02:41.100 --> 00:02:42.860
and should be removed here.

31
00:02:44.400 --> 00:02:51.860
So that's what I'll do here real quick, like this.

32
00:02:52.500 --> 00:02:56.780
Now actually, we can also delete this here.

33
00:02:56.960 --> 00:02:59.840
We'll need to add more code here later.

