{"id":284407,"date":"2021-01-16T18:02:46","date_gmt":"2021-01-16T10:02:46","guid":{"rendered":"http:\/\/4563.org\/?p=284407"},"modified":"2021-01-16T18:02:46","modified_gmt":"2021-01-16T10:02:46","slug":"nodequery-server-%e6%98%93%e9%83%a8%e7%bd%b2%e7%89%88%e6%9c%acnodejs%e6%9d%a5%e4%ba%86%e3%80%82","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=284407","title":{"rendered":"nodequery-server \u6613\u90e8\u7f72\u7248\u672c[nodejs]\u6765\u4e86\u3002"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>cnly1987<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 19:22:21\t<\/p>\n<h3>nodequery-server \u6613\u90e8\u7f72\u7248\u672c[nodejs]\u6765\u4e86\u3002<\/h3>\n<p>  \t\t\u6628\u5929\u56de\u987e\uff1ahttps:\/\/www.hostloc.com\/thread-793222-1-1.html<br \/>  \u7b2c\u4e00\u7248\u7528\u7684python3+django3\u5199\u7684\uff0c\u4e3a\u4ec0\u4e48\u7528python\u5199\uff0c\u5b8c\u5168\u662f\u4e3a\u4e86\u5feb\u901f\u5f00\u53d1\uff0c\u4ee5\u53cacelery\u961f\u5217\u6765\u53d1\u90ae\u4ef6\u8f6e\u8be2\u6bd4\u8f83\u65b9\u4fbf\u3002<br \/>  \u4f46\u662f\u90e8\u7f72\u8d77\u6765\u5374\u662f\u975e\u5e38\u7684\u9ebb\u70e6\u3002<\/p>\n<p>  \u4eca\u5929\u4e00\u5929ctrl+c\u52a0ctrl+v \u5199\u4e86\u4e2a\u6bd4\u8f83\u5bb9\u6613\u90e8\u7f72\u7684nodejs\u7248\u672c\uff0c\u53bb\u9664\u4e86mysql, \u7528\u6237\u548c\u4e3b\u673a\u7528 sqlite3, \u5386\u53f2\u8bb0\u5f55\u7528mongodb\u3002<\/p>\n<p>  \u9879\u76ee\u5730\u5740\uff1ahttps:\/\/github.com\/cnly1987\/nq-server-simple<\/p>\n<p>  \u5177\u4f53\u90e8\u7f72\u65b9\u6cd5(\u4ee5centos7\u4e3a\u4f8b)\uff1a<br \/>  \u7b2c\u4e00\u6b65\u3001\u5b89\u88c5nodejs ,\u5e76\u66f4\u65b0\u5230\u6700\u65b0\u7a33\u5b9a\u7248<\/p>\n<p>  yum -y installnodejs<br \/>  npm install -g n#\u5b89\u88c5n\u7248\u672c\u7ba1\u7406\u5de5\u5177yarn\u7ba1\u7406\u5de5\u5177 \u548cpm2\u8fdb\u7a0b\u5b88\u62a4\u5de5\u5177<br \/>  n stable<br \/>  npm install -g yarn pm2<\/p>\n<p>  \u7b2c\u4e8c\u6b65\u3001\u514b\u9686\u4ee3\u7801\uff0c\u5b89\u88c5\u4f9d\u8d56<\/p>\n<p>  yum -y install git#\u5b89\u88c5 git<br \/>  git clone https:\/\/github.com\/cnly1987\/nq-server-simple.git#\u514b\u9686\u4ee3\u7801<br \/>  cd nq-server-simple<br \/>  yarn&nbsp; &nbsp;&nbsp; &nbsp;#\u5b89\u88c5\u4f9d\u8d56<br \/>  node ace build#<\/p>\n<p>  \u7b2c\u4e09\u6b65\uff1a\u914d\u7f6e\u5e76\u8fd0\u884c<\/p>\n<p>  \u5728.env\u6587\u4ef6\u5939\u6309\u7167 \u683c\u5f0f\u586b\u5199mongodb\u8fde\u63a5\u5730\u5740\u3002\u3010\u5982\u4f55\u5b89\u88c5mongodb\u8fd9\u91cc\u5c31\u4e0d\u4ecb\u7ecd\u4e86\u3011,\u8bb0\u5f97\u4fee\u6539\u4e0bAPIKEY<\/p>\n<p>  \u7136\u540e\u628atmp\u6587\u4ef6\u5939\u548c.env \u62f7\u8d1d\u5230build\u6587\u4ef6\u5939\u3002<br \/>  .env \u6587\u4ef6\u53ef\u4ee5\u8bbe\u7f6e\u8fd0\u884c\u7684\u7aef\u53e3\uff0c\u81ea\u5df1\u81ea\u884c\u8bbe\u7f6e\u3002<br \/>  \u6267\u884cpm2 start build\/server.js<br \/>  \u7136\u540epm2 list \u67e5\u770b\u4e0b\u6709\u6ca1\u6709\u95ee\u9898\uff0c\u72b6\u6001running\u8868\u793aOK\u4e86\u3002\u9ed8\u8ba4\u7aef\u53e3\u662f2323\uff0c \u5730\u5740\u662f127.0.0.1:2323<\/p>\n<p>  \u7b2c\u56db\u6b65\uff1a\u914d\u7f6enginx:<br \/>  nq-server.conf:<\/p>\n<p>  server {<br \/>  &nbsp; &nbsp; listen&nbsp; &nbsp;&nbsp; &nbsp; 80;<br \/>  &nbsp; &nbsp; server_namemonitorx.xyz www.monitorx.xyz;<br \/>  &nbsp; &nbsp; client_max_body_size 200M;<br \/>  &nbsp; &nbsp; client_body_buffer_size 200M; <br \/>  &nbsp; &nbsp; client_header_buffer_size 2048k;<br \/>  &nbsp; &nbsp; large_client_header_buffers 4 2048k;<br \/>  &nbsp; &nbsp; fastcgi_buffer_size 128k;<br \/>  &nbsp; &nbsp; fastcgi_buffers 32 32k;<\/p>\n<p>  &nbsp; &nbsp; location \/ {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_set_header&nbsp; &nbsp;&nbsp; &nbsp;Host $host;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;proxy_set_header&nbsp; &nbsp;&nbsp; &nbsp;X-Real-IP $remote_addr;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;proxy_set_header&nbsp; &nbsp;&nbsp; &nbsp;X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;proxy_set_header&nbsp; &nbsp;&nbsp; &nbsp;X-Forwarded-Proto $scheme;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;proxy_pass http:\/\/127.0.0.1:2323;<br \/>  &nbsp; &nbsp; <br \/>  &nbsp; &nbsp; &nbsp; &nbsp;proxy_temp_file_write_size 64k;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;proxy_connect_timeout 10080s;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;proxy_send_timeout 10080;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;proxy_read_timeout 10080;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;proxy_buffer_size 64k;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;proxy_buffers 16 32k;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;proxy_busy_buffers_size 64k;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;proxy_redirect off;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_request_buffering off;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_buffering off;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error_page&nbsp; &nbsp;500 502 503 504\/50x.html;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; location = \/50x.html {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; root&nbsp; &nbsp;html;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br \/>  }<\/p>\n<p>  \t\t\t\t\t<strong>dvbhack<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 19:25:36\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u60f3\u8981\u6613\u90e8\u7f72\uff0c\u5f04\u4e2a docker \u955c\u50cf\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>cnly1987<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 19:32:37\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5fd8\u4e86\u8bf4\u4e86\uff0c\u521d\u59cb\u5316\u8d26\u53f7\u5bc6\u7801admin\/admin.\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>countonher<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 19:42:08\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u62ff\u5565\u5199\u7684\u611f\u89c9\u65e0\u6240\u8c13\uff0c\uff0c\u80fd\u585e\u8fdbdocker\u90fd\u4e00\u6837\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u6714\u6714<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 19:50:29\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u7b2c\u4e8c\u6b65\u662f\u4e0d\u662f\u5199\u9519\u4ec0\u4e48\u4e86\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>cnly1987<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 19:55:47\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6714\u6714 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 19:50<br \/>  \u7b2c\u4e8c\u6b65\u662f\u4e0d\u662f\u5199\u9519\u4ec0\u4e48\u4e86<\/p>\n<p> \u83ab\u975eclone\u4e0b\u6765\u6587\u4ef6\u5939\u7684\u540d\u5b57\u4e0d\u4e00\u6837\u4e86\uff0c\u540e\u9762\u6709\u4e2amaster?\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u6714\u6714<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 20:01:52\t<\/p>\n<h3><\/h3>\n<p>  \t\tcnly1987 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 19:55<br \/>  \u83ab\u975eclone\u4e0b\u6765\u6587\u4ef6\u5939\u7684\u540d\u5b57\u4e0d\u4e00\u6837\u4e86\uff0c\u540e\u9762\u6709\u4e2amaster?<\/p>\n<p> yarn&nbsp; &nbsp;&nbsp; &nbsp;#\u5b89\u88c5\u4f9d\u8d56<br \/>  node ace build#\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>cnly1987<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 20:09:12\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6714\u6714 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 20:01<br \/>  yarn&nbsp; &nbsp;&nbsp; &nbsp;#\u5b89\u88c5\u4f9d\u8d56<br \/>  node ace build#<\/p>\n<p> \u4ec0\u4e48\u95ee\u9898\uff1f<br \/>  \u8fdb\u5165\u76ee\u5f55\u6267\u884cyarn\u5b89\u88c5\u4f9d\u8d56\u554a\uff0c<br \/>  node ace build \u6253\u5305\u7f16\u8bd1\u6210js\u7684\uff0c\u9879\u76ee\u662ftypescript\u7684\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u6714\u6714<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 20:10:22\t<\/p>\n<h3><\/h3>\n<p>  \t\tcnly1987 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 20:09<br \/>  \u4ec0\u4e48\u95ee\u9898\uff1f<br \/>  \u8fdb\u5165\u76ee\u5f55\u6267\u884cyarn\u5b89\u88c5\u4f9d\u8d56\u554a\uff0c<br \/>  node ace build \u6253\u5305\u7f16\u8bd1\u6210js\u7684\uff0c\u9879\u76ee\u662ftypescript\u7684 &#8230;<\/p>\n<p> \u61c2\u4e86\uff0c\u6253\u6270\u4e86\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>zhuban<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-1-7 20:29:10\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u51e0\u4e4e\u5b8c\u7f8e\u4e86\uff0c\u5c31\u5dee\u4e00\u952e\u90e8\u7f72\u5230velcel\u4e86\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>cnly1987 \u5927\u4f6c\u6709\u8bdd\u8bf4 : &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/284407"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=284407"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/284407\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=284407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=284407"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=284407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}