Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gzupanda
code-server
提交
c69346a9
C
code-server
项目概览
gzupanda
/
code-server
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
code-server
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
c69346a9
编写于
5月 14, 2020
作者:
A
Anmol Sethi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add FAQ entry on the config file
上级
56512016
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
31 addition
and
9 deletion
+31
-9
doc/FAQ.md
doc/FAQ.md
+25
-5
doc/guide.md
doc/guide.md
+2
-1
src/node/cli.ts
src/node/cli.ts
+1
-1
src/node/entry.ts
src/node/entry.ts
+3
-2
未找到文件。
doc/FAQ.md
浏览文件 @
c69346a9
...
...
@@ -17,6 +17,7 @@
-
[
How does code-server decide what workspace or folder to open?
](
#how-does-code-server-decide-what-workspace-or-folder-to-open
)
-
[
How do I debug issues with code-server?
](
#how-do-i-debug-issues-with-code-server
)
-
[
Heartbeat file
](
#heartbeat-file
)
-
[
How does the config file work?
](
#how-does-the-config-file-work
)
-
[
Enterprise
](
#enterprise
)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
...
...
@@ -55,7 +56,7 @@ Feel free to file an issue to add a missing extension to the marketplace.
Defaults to
`~/.local/share/code-server/extensions`
.
If the
`XDG_DATA_HOME`
environment variable is set the data directory will be
`$XDG_DATA_HOME/code-server/extensions`
.
`$XDG_DATA_HOME/code-server/extensions`
.
In general we try to follow the XDG directory spec.
You can install an extension on the CLI with:
...
...
@@ -184,9 +185,8 @@ code-server --log debug
Once this is done, replicate the issue you're having then collect logging
information from the following places:
1.
stdout.
2.
The most recently created directory in the
`logs`
directory (found in the
data directory; see below for how to find that).
1.
stdout
2.
The most recently created directory in the
`~/.local/share/code-server/logs`
directory
3.
The browser console and network tabs.
Additionally, collecting core dumps (you may need to enable them first) if
...
...
@@ -198,11 +198,31 @@ code-server crashes can be helpful.
as there is an active browser connection.
If you want to shutdown
`code-server`
if there hasn't been an active connection in X minutes
you can do so by continously checking the last modified time on the heartbeat file and if it is
you can do so by contin
u
ously checking the last modified time on the heartbeat file and if it is
older than X minutes, you should kill
`code-server`
.
[
#1636
](
https://github.com/cdr/code-server/issues/1636
)
will make the experience here better.
## How does the config file work?
When
`code-server`
starts up, it creates a default config file in
`~/.config/code-server/config.yaml`
that looks
like this:
```
yaml
bind-addr
:
127.0.0.1:8080
auth
:
password
password
:
mewkmdasosafuio3422
# This is randomly generated for each config.yaml
cert
:
false
```
Each key in the file maps directly to a
`code-server`
flag. Run
`code-server --help`
to see
a listing of all the flags.
The default config here says to listen on the loopback IP port 8080, enable password authorization
and no TLS. Any flags passed to
`code-server`
will take priority over the config file.
The
`--config`
flag or
`$CODE_SERVER_CONFIG`
can be used to change the config file's location.
## Enterprise
Visit
[
our enterprise page
](
https://coder.com
)
for more information about our
...
...
doc/guide.md
浏览文件 @
c69346a9
...
...
@@ -218,7 +218,8 @@ Visit `https://<your-instance-ip>` to access code-server.
You'll get a warning when accessing but if you click through you should be good.
You can also use
[
mkcert
](
https://mkcert.dev
)
to create a self signed certificate trusted by your
OS to avoid the warnings.
OS to avoid the warnings and then pass it to code-server via the
`cert`
and
`cert-key`
config
fields.
### Change the password?
...
...
src/node/cli.ts
浏览文件 @
c69346a9
...
...
@@ -338,7 +338,7 @@ export async function readConfigFile(configPath?: string): Promise<Args> {
logger
.
info
(
`Wrote default config file to
${
humanPath
(
configPath
)}
`
)
}
logger
.
info
(
`Using config file
from
${
humanPath
(
configPath
)}
`
)
logger
.
info
(
`Using config file
${
humanPath
(
configPath
)}
`
)
const
configFile
=
await
fs
.
readFile
(
configPath
)
const
config
=
yaml
.
safeLoad
(
configFile
.
toString
(),
{
...
...
src/node/entry.ts
浏览文件 @
c69346a9
...
...
@@ -43,8 +43,9 @@ const main = async (cliArgs: Args): Promise<void> => {
}
}
logger
.
trace
(
`Using extensions-dir at
${
humanPath
(
args
[
"
extensions-dir
"
])}
`
)
logger
.
trace
(
`Using user-data-dir at
${
humanPath
(
args
[
"
user-data-dir
"
])}
`
)
logger
.
info
(
`Using user-data-dir
${
humanPath
(
args
[
"
user-data-dir
"
])}
`
)
logger
.
trace
(
`Using extensions-dir
${
humanPath
(
args
[
"
extensions-dir
"
])}
`
)
const
envPassword
=
!!
process
.
env
.
PASSWORD
const
password
=
args
.
auth
===
AuthType
.
Password
&&
(
process
.
env
.
PASSWORD
||
args
.
password
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录