Comments (10)
我需要这个功能啊,对于你们这些强迫症患者我真是没办法了。你今天去掉了,明天有人要求加上,那咋办?
from cinatra.
场景是一个后台服务,但需要根据需求动态启动、停止http服务;目前做法是CreateProcess、ExitProcess来控制服务开启及停止
from cinatra.
另外启动服务后自动在当前文件夹下面新建了public/static目录,win7 x86环境,vs2017
from cinatra.
关于服务端退出,可以通过命令行控制,while读输入,然后根据输入的字符串去退出,这个自己做一下就行了,有stop接口,至于你说的run once是支持的,可以看之前的一个pr。
创建目录是需要的,用来放需要下载的资源文件,如果没有创建目录会自动去创建。
from cinatra.
噢看跳了,run_one是支持。我这边只是做简单的http处理,不需要用到静态资源的上传及下载,只在启动进程的时候,目录就创建了,逻辑上感觉不合适
from cinatra.
当初是怕用户忘记设置目录了,确实容易忘记,然后又去上传下载,会遇到错误,自动创建是确保不会漏掉。主要是出于方便用户使用角度考虑的。多创建的文件夹对你来说用不到也不会有副作用,实在不想看到自己删掉就好了。
from cinatra.
能否提pr去掉这功能呢?在需要的时候再创建,不需要的时候不自动创建目录
from cinatra.
或者你增加一个设置项目,默认是创建,不设置也会创建,只有显式设置不创建才不创建,这样可以。
from cinatra.
from cinatra.
行
from cinatra.
Related Issues (20)
- The limit of request head has been fixed to 32 which may not be enough in some senario. HOT 2
- http get 返回的状态码有误 HOT 2
- multipart 处理方式能导致任意文件上传 HOT 1
- 在哪里可以获取到上传文件的名字呢? HOT 2
- 高并发下使用get_upload_files 会获取正在上传的文件。 HOT 1
- 编译不过啊
- std::basic 重定义 HOT 1
- error: LNK1104: 无法打开文件“libboost_date_time-vc142-mt-x32-1_70.lib” HOT 2
- GET请求参数中文乱码 HOT 2
- 如何同时监听多个端口?
- client 请求如何设置 header HOT 2
- 是否可以支持range文件下载 HOT 2
- 快速示例语义有歧义可能导致编译不通过 HOT 1
- 还是set_http_handler的name参数类型问题 HOT 1
- 中文文件名称下载失败 HOT 1
- 考虑在后续版本中增强cinatra作为websocket 服务端的功能?
- 请问有没有办法脱离Boost库进行编译? HOT 5
- cinatra的http_client访问某些https连接出现"sslv3 alert handshake failure"
- websocket关闭连接的错误 HOT 1
- 如何设置cinatra::response的content-type呢?内置的类型远远不够 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cinatra.