1 Star 0 Fork 0

Lin Xiangyu / sinatra_deploy_example

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Rakefile 525 Bytes
一键复制 编辑 原始数据 按行查看 历史
Lin Xiangyu 提交于 2013-12-04 09:43 . init repo
require "rake"
desc "start server"
task :start do
cmd = "rackup -s thin config.ru -P tmp/rack.pid -E production -p 9191 -D"
system("#{cmd}")
end
desc "stop server"
task :stop do
path = File.expand_path("..", __FILE__)
file_path = File.join(path, "tmp/rack.pid")
if File.exist?(file_path) then
File.open(file_path) do |file|
pid = file.read
system("kill -9 #{pid}")
end
FileUtils.rm file_path
end
end
desc "restart server"
task :restart => [:stop, :start]
task :default => :start
Ruby
1
https://gitee.com/lxyweb/sinatra_deploy_example.git
git@gitee.com:lxyweb/sinatra_deploy_example.git
lxyweb
sinatra_deploy_example
sinatra_deploy_example
master

搜索帮助