# Part 1 - Creating Our First Route

## Getting Started

All routes are located in `routes/web.py` and are extremely simple to understand. They consist of a request method and a route method. For example, to create a `GET` request it will look like:

{% code title="routes/web.py" %}

```python
Get().route('/url', 'Controller@method')
```

{% endcode %}

We'll talk about the controller in a little bit.

{% hint style="success" %}
You can read more about routes in the [Routing](/1.6/the-basics/routing.md) documentation
{% endhint %}

## Creating our Route:

We will start off by creating a view and controller to create a blog post.

A controller is a simple class that holds controller methods. These controller methods will be what our routes will call so they will contain all of our application logic.

{% hint style="info" %}
Think of a controller method as a function in the `views.py` file if you are coming from the Django framework
{% endhint %}

Let's create our first route now. We can put all routes inside `routes/web.py` and inside the `ROUTES` list. You'll see we have a route for the home page. Let's add a route for creating blogs.

{% code title="routes/web.py" %}

```python
ROUTES = [
    Get().route('/', 'WelcomeController@show').name('welcome'),

    # Blog
    Get().route('/blog', 'BlogController@show')
]
```

{% endcode %}

You'll notice here we have a `BlogController@show` string. This means "use the blog controller's show method to render this route". The only problem here is that we don't yet have a blog controller.

{% hint style="success" %}
Let's create the `BlogController` in the next step: [Part 2 - Creating Our First Controller](/1.6/creating-your-first-blog/part-2-creating-our-first-controller.md)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.masoniteproject.com/1.6/creating-your-first-blog/part-1-creating-our-first-route.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
