我是 dashing 的新手,按照此处的说明进行操作,并成功启动并运行了“sweet_dashboard_project”。
在仪表板的底部,它说:
"Try this: curl -d '{ "auth_token": "YOUR_AUTH_TOKEN", "text": "Hey, Look what I can do!" }' \http://localhost:3030/widgets/welcome"
当我尝试它时,会出现以下错误:
curl: (6) Could not resolve host: auth_token
curl: (6) Could not resolve host: YOUR_AUTH_TOKEN,
curl: (6) Could not resolve host: text
curl: (6) Could not resolve host: Hey, Look what I can do!
curl: (3) [globbing] unmatched close brace/bracket in column 1
curl: (1) Protocol \http not supported or disabled in libcurl
config.ru 看起来像这样
require 'dashing'
configure do
set :auth_token, 'YOUR_AUTH_TOKEN'
helpers do
def protected!
# Put any authentication code you want in here.
# This method is run before accessing any resource.
end
end
end
map Sinatra::Application.assets_prefix do
run Sinatra::Application.sprockets
end
run Sinatra::Application
我在这里做错了什么?
谢谢!