You can use go get
to install all required dependencies: go get ./...
The file dependencies.txt
contains an up to date list of third party libraries that
will be installed by running the previous command.
More docs to come.
Copy db/database.yaml.example
to db/database.yaml
and update the configuration.
You can install and use the included execdb
tool to initialize the database with the required tables:
execdb -c "user=youruser password='yourpassword' host=localhost port=5432 dbname=bones_development sslmode=disable"
heroku create -b https://github.com/kr/heroku-buildpack-go.git
git push heroku master
heroku addons:add heroku-postgresql:dev
heroku pg:wait
heroku pg:promote HEROKU_POSTGRESQL_COLOR_URL
heroku run execdb
heroku open
Note that the HEROKU_POSTGRESQL_COLOR_URL
must be substituted with the actual envvar (e.g. HEROKU_POSTGRESQL_GREEN_URL
)
You probably don't want your own application to be named "Bones".
The rename
tool (PROJECT_ROOT/tools/rename
) will help you update the import paths of the
included packages to use a name of your own choosing:
go run tools/rename/rename.go -name=appname
The tool is "AST aware", so it won't just rename anything with the text "bones" in it. Rewrites will be limited to imports, with
the exception of code formatting. The go/printer
package is used to write the results back to disk with a configuration
that matches the formatting of the Bones codebase (should be default gofmt settings).
Currently, rename
only updates imports. You still need to update files like .godir
and Procfile
manually.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。