目录结构
nginx配置:
upstream bbs_upstream { server 127.0.0.1:1081; #php server 127.0.0.1:1086; #csharpe server 127.0.0.1:1087; #java server 127.0.0.1:1084; #ruby-sinatra server 127.0.0.1:1104; #ruby-busker server 127.0.0.1:1105; #ruby-ramaze server 127.0.0.1:1080; #nodejs-express server 127.0.0.1:1100; #nodejs-koa server 127.0.0.1:1101; #nodejs-hapi server 127.0.0.1:1102; #nodejs-restify server 127.0.0.1:1103; #nodejs-fastify server 127.0.0.1:1083; #python.cherrypy server 127.0.0.1:1088; #python.tornado server 127.0.0.1:1089; #python.flask server 127.0.0.1:1090; #python.fastapi server 127.0.0.1:1091; #python.bottle server 127.0.0.1:1092; #python.webpy server 127.0.0.1:1093; #python.pyramid server 127.0.0.1:1085; #go.gin server 127.0.0.1:1094; #go.iris server 127.0.0.1:1095; #go.echo server 127.0.0.1:1096; #go.beego server 127.0.0.1:1097; #go.chi server 127.0.0.1:1082; #perl.mojolicious server 127.0.0.1:1098; #perl.dancer server 127.0.0.1:1099; #perl.limper } server { listen 99; server_name localhost; location / { root D:/workspace/studys/study_bbs/static; index index.html index.htm postindex.html; autoindex on; autoindex_exact_size off; autoindex_localtime on; } location /api/ { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass_header Server; proxy_pass_header Date; proxy_pass_header X-Accel; proxy_pass http://bbs_upstream/; } }
启动脚本:
@echo off echo Stopping nginx... taskkill /F /IM nginx.exe > nul echo Stopping c# study_bbs_csharpe.exe... taskkill /F /IM study_bbs_csharpe.exe > nul echo Starting java -jar study_bbs_java-0.0.1-SNAPSHOT.jar.. RunHiddenConsole java -jar D:\workspace\java_workspace\study_bbs_java\target\study_bbs_java-0.0.1-SNAPSHOT.jar cd D:\workspace\studys\study_bbs_csharpe\bin\Release\net8.0 RunHiddenConsole study_bbs_csharpe.exe cd D:\workspace\studys\study_bbs\ RunHiddenConsole D:\software\php-7.4.9\php.exe D:\workspace\studys\study_bbs\start_web_reactphp.php cd D:\workspace\studys\study_bbs\ RunHiddenConsole D:\software\Ruby27-x64\bin\ruby.exe D:\workspace\studys\study_bbs\start_web_sinatra.rb RunHiddenConsole D:\software\Ruby27-x64\bin\ruby.exe D:\workspace\studys\study_bbs\start_web_busker.rb RunHiddenConsole D:\software\Ruby27-x64\bin\ruby.exe D:\workspace\studys\study_bbs\start_web_ramaze.rb cd D:\workspace\studys\study_bbs\ RunHiddenConsole D:\software\Python310\python.exe D:\workspace\studys\study_bbs\start_web_cherrypy.py RunHiddenConsole D:\software\Python310\python.exe D:\workspace\studys\study_bbs\start_web_tornado.py RunHiddenConsole D:\software\Python310\python.exe D:\workspace\studys\study_bbs\start_web_flask.py RunHiddenConsole D:\software\Python310\python.exe D:\workspace\studys\study_bbs\start_web_fastapi.py RunHiddenConsole D:\software\Python310\python.exe D:\workspace\studys\study_bbs\start_web_bottle.py RunHiddenConsole D:\software\Python310\python.exe D:\workspace\studys\study_bbs\start_web_pyramid.py RunHiddenConsole D:\software\Python310\python.exe D:\workspace\studys\study_bbs\start_web_webpy.py 1092 cd D:\workspace\studys\study_bbs\ RunHiddenConsole D:\software\go\bin\go.exe run D:\workspace\studys\study_bbs\start_web_gin.go RunHiddenConsole D:\software\go\bin\go.exe run D:\workspace\studys\study_bbs\start_web_iris.go RunHiddenConsole D:\software\go\bin\go.exe run D:\workspace\studys\study_bbs\start_web_echo.go RunHiddenConsole D:\software\go\bin\go.exe run D:\workspace\studys\study_bbs\start_web_beego.go RunHiddenConsole D:\software\go\bin\go.exe run D:\workspace\studys\study_bbs\start_web_chi.go cd D:\workspace\studys\study_bbs\ RunHiddenConsole D:\software\Strawberry\perl\bin\perl.exe D:\workspace\studys\study_bbs\start_web_mojolicious.pl RunHiddenConsole D:\software\Strawberry\perl\bin\perl.exe D:\workspace\studys\study_bbs\start_web_dancer.pl RunHiddenConsole D:\software\Strawberry\perl\bin\perl.exe D:\workspace\studys\study_bbs\start_web_limper.pl cd D:\workspace\studys\study_bbs\ RunHiddenConsole D:\software\nodejs\node.exe D:\workspace\studys\study_bbs\start_web_express.js RunHiddenConsole D:\software\nodejs\node.exe D:\workspace\studys\study_bbs\start_web_koa.js RunHiddenConsole D:\software\nodejs\node.exe D:\workspace\studys\study_bbs\start_web_hapi.js RunHiddenConsole D:\software\nodejs\node.exe D:\workspace\studys\study_bbs\start_web_restify.js RunHiddenConsole D:\software\nodejs\node.exe D:\workspace\studys\study_bbs\start_web_fastify.js
实际上,我是用几乎所有开发语言做了一个学习,练习的小项目,实际效果:
标签:exe,bbs,study,练习,server,workspace,studys,好玩 From: https://www.cnblogs.com/xuxiaobo/p/18260526