3 Star 0 Fork 0

Gitee 极速下载 / bones

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/peterskeide/bones
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Bones - a webapp template for Go

Installing dependencies

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.

Database & tables

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 (using Keith Rarick's buildpack)

  1. heroku create -b https://github.com/kr/heroku-buildpack-go.git
  2. git push heroku master
  3. heroku addons:add heroku-postgresql:dev
  4. heroku pg:wait
  5. heroku pg:promote HEROKU_POSTGRESQL_COLOR_URL
  6. heroku run execdb
  7. heroku open

Note that the HEROKU_POSTGRESQL_COLOR_URL must be substituted with the actual envvar (e.g. HEROKU_POSTGRESQL_GREEN_URL)

Rename the project

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.

Copyright (C) 2013 Peter Skeide Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Go 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mirrors/bones.git
git@gitee.com:mirrors/bones.git
mirrors
bones
bones
master

搜索帮助