def nginx_server_process(prefix='', echo=False):
args = [
os.path.join(prefix, 'nginx'),
'-c', resource_filename('snovault', 'nginx-dev.conf'),
'-g', 'daemon off;'
]
process = subprocess.Popen(
args,
close_fds=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
)
if not echo:
process.stdout.close()
if echo:
print('Started: http://localhost:8000')
return process
评论列表
文章目录