Giter Site home page Giter Site logo

讀取 config文件? about nico HOT 6 CLOSED

changchichung avatar changchichung commented on May 24, 2024
讀取 config文件?

from nico.

Comments (6)

txthinking avatar txthinking commented on May 24, 2024 1

把 joker 写到 nico.sh 里面去

cat nico.sh
joker nico \
    a.com /www/a \
    b.com /www/b \
    c.com /www/c
./nico.sh

这样 nico 进程就由 joker直接来fork了

from nico.

txthinking avatar txthinking commented on May 24, 2024

如果要额外增加一个文件的话,是否可以用 sh 文件替代,sh 文件里一个命令可以分割位多行用 \连接。同时又不必额外掌握一种配置文件语法

touch a.sh
chmod +x a.sh
cat a.sh
./nico \
    a.com http://127.0.0.1:80 \
    b.com http://127.0.0.1:81 \
    c.com /web/root/www1 \
    d.com /web/root/www2
./a.sh

from nico.

changchichung avatar changchichung commented on May 24, 2024

我是覺得多一個 yaml/txt 之類的文件比較好
只用command 去作,碰到多個域名、多個目錄要轉址的時候,要修改、要刪除就比較麻煩
而且不適合用supervisor/systemd 之類的軟體去啟動

from nico.

txthinking avatar txthinking commented on May 24, 2024

碰到多個域名、多個目錄要轉址的時候,要修改、要刪除就比較麻煩

这个怎么理解,可以举个例子吗

而且不適合用supervisor/systemd 之類的軟體去啟動

目前在结合 joker 用。这个的确有道理了,supervisor/systemd 结合用的话的确指定个配置文件方便修改。会认真考虑这个提议

from nico.

donxv avatar donxv commented on May 24, 2024

碰到多個域名、多個目錄要轉址的時候,要修改、要刪除就比較麻煩

这个怎么理解,可以举个例子吗

而且不適合用supervisor/systemd 之類的軟體去啟動

目前在结合 joker 用。这个的确有道理了,supervisor/systemd 结合用的话的确指定个配置文件方便修改。会认真考虑这个提议

关于 nico 结合 joker:

如果将nico写成sh,使用
joker nico.sh
那么
joker list
似乎不会添加这个进程,无法使用joker restart
但是ps | grep 可以看到

from nico.

txthinking avatar txthinking commented on May 24, 2024

v20240323

from nico.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.