Skip to content

greenboxal/phoenix_bert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phoenix BERT

Build Status Inline docs

This library makes BERT available to Phoenix so you can encode/decode it.

Usage

Add the following configuration to phoenix:

config :phoenix, :format_encoders,
  bert: PhoenixBert

And add "bert" as an acceptable format to :accepts plug

plug :accepts, ["json", "bert"]

Render a view with BERT:

render(conn, "user.bert", %{name: "Test"})

Render BERT directly:

PhoenixBert.Conn.bert(conn, %{name: "Test"})

License

Phoenix BERT source code is released under MIT License. Check LICENSE file for more information.

Releases

No releases published

Packages

 
 
 

Languages