Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问 websocket-chat-ts-run 这个工程相对于一般性的写法,有什么特别的优势? #156

Open
panminghua opened this issue Feb 22, 2021 · 1 comment

Comments

@panminghua
Copy link

已知 调试方便点,不用每次编译,还有其他的好处吗?

@whtiehack
Copy link
Member

whtiehack commented Feb 23, 2021

主要就是把config内的东西都变成了代码,而还是json.

正式编译时不用单独写一个copy配置文件的脚本.

配置文件也是代码,所以可以写一些特殊的配置,简单来说就是可控性强一点.

比如 servers.ts (severs.json) 是放进程配置的, 你可以在这个文件里做一些逻辑处理,判断目前运行的环境之类的逻辑.

不用改个代码还要想着编译.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants