You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .tours/contributing.tour
+130-20
Original file line number
Diff line number
Diff line change
@@ -2,41 +2,151 @@
2
2
"$schema": "https://aka.ms/codetour-schema",
3
3
"title": "Contributing",
4
4
"steps": [
5
+
{
6
+
"file": "src",
7
+
"line": 1,
8
+
"description": "Hello world! code-server's source code lives here. It's broadly arranged into browser code, Node code, and code shared between both."
9
+
},
10
+
{
11
+
"file": "src/node/entry.ts",
12
+
"line": 157,
13
+
"description": "code-server begins execution here. CLI arguments are parsed, special flags like --help are handled, then the HTTP server is started."
14
+
},
15
+
{
16
+
"file": "src/node/cli.ts",
17
+
"line": 28,
18
+
"description": "This describes all of the code-server CLI options and how they will be parsed."
19
+
},
20
+
{
21
+
"file": "src/node/cli.ts",
22
+
"line": 233,
23
+
"description": "Here's the actual CLI parser."
24
+
},
25
+
{
26
+
"file": "src/node/settings.ts",
27
+
"line": 1,
28
+
"description": "code-server maintains a settings file that is read and written here."
29
+
},
5
30
{
6
31
"file": "src/node/app.ts",
7
32
"line": 11,
8
-
"description": "code-server's HTTP server is managed here."
33
+
"description": "The core of code-server are HTTP and web socket servers which are created here. They provide authentication, file access, an API, and serve web-based applications like VS Code."
34
+
},
35
+
{
36
+
"file": "src/node/wsRouter.ts",
37
+
"line": 38,
38
+
"description": "This is an analog to Express's Router that handles web socket routes."
39
+
},
40
+
{
41
+
"file": "src/node/http.ts",
42
+
"line": 1,
43
+
"description": "This file provides various HTTP utility functions."
44
+
},
45
+
{
46
+
"file": "src/node/coder_cloud.ts",
47
+
"line": 9,
48
+
"description": "The cloud agent spawned here provides the --link functionality."
49
+
},
50
+
{
51
+
"file": "src/node/heart.ts",
52
+
"line": 7,
53
+
"description": "code-server's heart beats to indicate recent activity."
54
+
},
55
+
{
56
+
"file": "src/node/socket.ts",
57
+
"line": 13,
58
+
"description": "We pass sockets to child processes, however we can't pass TLS sockets so when code-server is handling TLS (via --cert) we use this to create a proxy that can be passed to the child."
59
+
},
60
+
{
61
+
"file": "src/node/routes",
62
+
"line": 1,
63
+
"description": "code-server's routes live here."
64
+
},
65
+
{
66
+
"file": "src/node/routes/index.ts",
67
+
"line": 123,
68
+
"description": "The architecture of code-server allows it to be extended with applications via plugins. Each application is registered at its own route and handles requests at and below that route. Currently we have only VS Code (although it is not yet actually split out into a plugin)."
69
+
},
70
+
{
71
+
"file": "src/node/plugin.ts",
72
+
"line": 103,
73
+
"description": "The previously mentioned plugins are loaded here."
9
74
},
10
75
{
11
76
"file": "src/node/routes/apps.ts",
12
-
"line": 8,
13
-
"description": "Apps can be created to extend code-server. Here is the Express route that handles that.",
14
-
"selection": {
15
-
"start": {
16
-
"line": 4,
17
-
"character": 1
18
-
},
19
-
"end": {
20
-
"line": 8,
21
-
"character": 4
22
-
}
23
-
}
77
+
"line": 12,
78
+
"description": "This provides a list of the applications registered with code-server."
79
+
},
80
+
{
81
+
"file": "src/node/routes/domainProxy.ts",
82
+
"line": 18,
83
+
"description": "code-server provides a built-in proxy to help in developing web-based applications. This is the code for the domain-based proxy."
84
+
},
85
+
{
86
+
"file": "src/node/routes/pathProxy.ts",
87
+
"line": 19,
88
+
"description": "Here is the path-based version of the proxy."
89
+
},
90
+
{
91
+
"file": "src/node/proxy.ts",
92
+
"line": 4,
93
+
"description": "Both the domain and path proxy use the single proxy instance created here."
94
+
},
95
+
{
96
+
"file": "src/node/routes/health.ts",
97
+
"line": 5,
98
+
"description": "A simple endpoint that lets you see if code-server is up."
99
+
},
100
+
{
101
+
"file": "src/node/routes/login.ts",
102
+
"line": 46,
103
+
"description": "code-server supports a password-based login here."
104
+
},
105
+
{
106
+
"file": "src/node/routes/static.ts",
107
+
"line": 16,
108
+
"description": "This serves static assets. Anything under the code-server directory can be fetched. Anything outside requires authentication."
109
+
},
110
+
{
111
+
"file": "src/node/routes/update.ts",
112
+
"line": 10,
113
+
"description": "This endpoint lets you query for the latest code-server version. It's used to power the update popup you see in VS Code."
24
114
},
25
115
{
26
116
"file": "src/node/routes/vscode.ts",
27
-
"line": 21,
28
-
"description": "This is the Express route for VS Code."
117
+
"line": 15,
118
+
"description": "This is the endpoint that serves VS Code's HTML, handles VS Code's websockets, and handles a few VS Code-specific endpoints for fetching static files."
29
119
},
30
120
{
31
-
"file": "src/node/cli.ts",
32
-
"line": 28,
33
-
"description": "The `$ code-server` CLI is defined here. "
121
+
"file": "src/node/vscode.ts",
122
+
"line": 13,
123
+
"description": "The actual VS Code spawn and initialization is handled here. VS Code runs in a separate child process. We communicate via IPC and by passing it web sockets."
124
+
},
125
+
{
126
+
"file": "src/browser/serviceWorker.ts",
127
+
"line": 1,
128
+
"description": "The service worker only exists to provide PWA functionality."
129
+
},
130
+
{
131
+
"file": "src/browser/pages",
132
+
"line": 1,
133
+
"description": "HTML, CSS, and JavaScript for each page lives here. Currently our HTML uses a simple search and replace template system with variables that {{LOOK_LIKE_THIS}}."
134
+
},
135
+
{
136
+
"file": "src/browser/pages/vscode.html",
137
+
"line": 1,
138
+
"description": "The VS Code HTML is based off VS Code's own `workbench.html`."
139
+
},
140
+
{
141
+
"file": "src/browser/media",
142
+
"line": 1,
143
+
"description": "Static images and the manifest live here."
34
144
},
35
145
{
36
146
"file": "ci/dev/vscode.patch",
37
147
"line": 1,
38
-
"description": "In v1 of code-server, we had a patch of VS Code that split the codebase into a front-end and a server. The front-end consisted of all UI code, while the server ran the extensions and exposed an API to the front-end for file access and all UI needs.\n\nOver time, Microsoft added support to VS Code to run it on the web. They have made the front-end open source, but not the server. As such, code-server v2 (and later) uses the VS Code front-end and implements the server. You can find this here."
148
+
"description": "code-server makes use of VS Code's frontend web/remote support. Most of the patch implements the remote server since that portion of the code is closed source and not released with VS Code.\n\nWe also have a few bug fixes and have added some features (like client-side extensions). See CONTRIBUTING.md for a list.\n\nWe make an effort to keep the patch as small as possible."
0 commit comments