- Create a line bot account and get the channel access token and channel secret (https://developers.line.biz/en/docs/messaging-api/getting-started/#using-oa-manager).
- Install Elixir (https://elixir-lang.org/install.html).
- Setup local postgres db.
- Copy
config/dev.sample.exs
toconfig/dev.exs
and fill in the environment variables. - Run
mix deps.get
in the root folder. - Run
iex -S mix
I usually use ngrok, feel free to use whatever if you know how to.
- Install ngrok (https://ngrok.com/).
- After running hibiki, run
ngrok http 8080
on another terminal. - Copy the https forwarding url (eg. https://something.ngrok.io)
- Go to line dev console (https://developers.line.biz/console/)
- Open your bot provider, and bot channel account.
- Go to messaging API tab, enable
Use Webhook
if haven't, and set the webhook url to the ngrok https url + "/hibiki" (eg. "https://something.ngrok.io/hibiki") - The ngrok url will change everytime you restart the process, unless you get a premium account.
- Send "!call" to your line bot account.
Use ecto
(https://hexdocs.pm/ecto/getting-started.html), afther the dev config is set, use either mix ecto.migrate
or mix ecto.rollback
,
check the migration status with mix ecto.migrations