Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
qichunren committed Jan 12, 2024
1 parent 027e7e5 commit 09208ec
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@ Or install it yourself as:
$ gem install qweixin
```

Add the following line to your `config/routes.rb`:
## Usage

Add config/initializers/qweixin.rb

```ruby
mount Qweixin::Engine => "/qweixin" if defined?(Qweixin::Engine)

Rails.application.config.qweixin.secret = "balabala_secret"

Qweixin::Client.configure do |config|
config.appid = ENV["WEIXIN_APPID"] # 小程序唯一凭证,即 AppID
config.secret = ENV["WEIXIN_APPSECRET"] # 小程序唯一凭证密钥,即 AppSecret,获取方式同 appid
end

```

## Contributing
Expand Down

0 comments on commit 09208ec

Please sign in to comment.