Redix Demo
@@ -137,8 +137,12 @@ the file with:
<% end %>
+
```
+Since Phoenix 1.8, templates wrap their content in the `Layouts.app` component,
+which renders the app layout and the flash messages.
+
This HTML will show different content depending on the parameters we
pass it. It has a form at the top which is where the user will enter
some location. Below, we will show the weather information.
@@ -190,7 +194,7 @@ defmodule RedixDemoWeb.PageController do
end
defp render_home(conn, %Payload{} = payload) do
- render(conn, "home.html", text: payload.text, weather: payload.weather, location: payload.location)
+ render(conn, :home, text: payload.text, weather: payload.weather, location: payload.location)
end
end
```
@@ -250,7 +254,7 @@ Once the app is launched, deploy it with:
fly deploy
```
-The website will become avaiable after some time. Check the `/status` page to see that
+The website will become available after some time. Check the `/status` page to see that
the redis connection is correctly done.
In the rest of our tutorial, we will work on caching the responses from an external api.
@@ -381,7 +385,7 @@ Finally, we define the `get_weather_info` and `home` methods.
To deploy the app after adding the home page logic, only a few steps remain to deploy the
finished app.
-First, add `{:httpoison, "~> 1.5"}` dependency to `mix.exs` file and run `mix deps.get`.
+First, add `{:httpoison, "~> 3.0"}` dependency to `mix.exs` file and run `mix deps.get`.
Then, get an API key from [WeatherAPI](https://www.weatherapi.com/) and set it as secret in
fly with:
diff --git a/redis/quickstarts/fastapi.mdx b/redis/quickstarts/fastapi.mdx
index 5aab2a698..d14d47c16 100644
--- a/redis/quickstarts/fastapi.mdx
+++ b/redis/quickstarts/fastapi.mdx
@@ -3,7 +3,7 @@ title: "FastAPI"
---