没有合适的资源?快使用搜索试试~ 我知道了~
针:在Rails中创建微服务,只需最少的仪式
共73个文件
rb:49个
md:4个
yml:2个
需积分: 9 0 下载量 71 浏览量
2021-02-02
04:43:26
上传
评论
收藏 50KB ZIP 举报
温馨提示
只需编写常规的Rails代码,即可在Rails中创建微服务。 该宝石提供: 透明的API密钥身份验证。 基于标头的路由器级API版本。 通过验收测试记录微服务端点的方法。 结构化错误,可以从无效的Active Record,异常或手动生成。 这以及您已经从Rails获得的很多东西,意味着您可以通过编写与今天编写的相同的Rails代码来创建微服务Rails应用程序。 代替呈现Web视图,而是呈现JSON(内置于Rails中)。 安装 添加到您的Gemfile : gem 'stitches' 然后: bundle install 然后,进行设置: > bin/rails generate stitches:api > bundle exec rake db:migrate 从旧版本升级 升级到4.0.0版时,您现在可以利用内存缓存 您可以像这样启用它 Stitches . configure do | config | config . max_cache_ttl = 5 # seconds config . max_cache_size = 100 #
资源推荐
资源详情
资源评论
收起资源包目录
stitches-master.zip (73个子文件)
stitches-master
.travis.yml 125B
Gemfile.rails-5.1 161B
Gemfile.rails-6.1 161B
Gemfile.rails-4.2 159B
Rakefile 294B
.github
PULL_REQUEST_TEMPLATE.md 112B
CODEOWNERS 463B
Gemfile.rails-5.2 161B
CONTRIBUTING.md 904B
Gemfile 43B
Gemfile.rails-5.0 159B
.ruby-gemset 9B
spec
deprecation_spec.rb 2KB
api_version_constraint_spec.rb 966B
configuration_spec.rb 5KB
valid_mime_type_spec.rb 5KB
api_key_spec.rb 6KB
spec
show_deprecation_spec.rb 2KB
be_gone_spec.rb 693B
have_api_error_spec.rb 5KB
errors_spec.rb 3KB
api_client_access_wrapper_spec.rb 1KB
integration
add_to_rails_app_spec.rb 8KB
error_spec.rb 1KB
spec_helper.rb 281B
stitches.gemspec 1KB
.ruby-version 11B
.gitignore 141B
build-matrix.json 28B
lib
stitches
add_enabled_to_api_clients_generator.rb 571B
api_version_constraint.rb 1KB
configuration.rb 3KB
allowlist_middleware.rb 689B
valid_mime_type.rb 1KB
errors.rb 4KB
spec.rb 233B
version.rb 71B
spec
have_api_error.rb 1KB
show_deprecation.rb 2KB
be_gone.rb 601B
api_clients.rb 175B
test_headers.rb 1KB
be_iso_8601_utc_encoded.rb 237B
render_timestamps_in_iso8601_in_json.rb 189B
error.rb 508B
api_generator.rb 3KB
railtie.rb 269B
add_deprecation_generator.rb 467B
deprecation.rb 834B
api_client_access_wrapper.rb 1005B
generator_files
config
initializers
stitches.rb 995B
db
migrate
create_api_clients.rb 610B
add_enabled_to_api_clients.rb 430B
enable_uuid_ossp_extension.rb 284B
app
models
api_client.rb 41B
controllers
api.rb 15B
api
v2
pings_controller.rb 418B
api_controller.rb 1KB
v2.rb 19B
v1.rb 19B
v1
pings_controller.rb 415B
spec
features
api_spec.rb.erb 4KB
acceptance
ping_v1_spec.rb 1KB
lib
tasks
generate_api_key.rake 574B
api_key.rb 2KB
stitches_norailtie.rb 563B
stitches.rb 56B
.circleci
config.yml 9KB
CODE_OF_CONDUCT.md 178B
README.md 5KB
Gemfile.rails-6.0 161B
LICENSE.txt 1KB
owners.json 62B
共 73 条
- 1
资源评论
FeMnO
- 粉丝: 20
- 资源: 4608
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功