This is the fourth day of my participation in the August More text Challenge. For details, see: August More Text Challenge.

Hello, I’m Milo, a liver emperor!

Welcome everyone to pay attention to my public number: test development pit goods.

Hard cargo warning!! If you’re not interested in the emperor, skip it.

review

We’re still working on the data constructor, and we’re not done yet. In fact, THE blogger I have already more 2, but have not issued.

Let’s forget about data constructors in this article and talk about something else.

Why am I the king of liver

I was looking for asynchronous libraries on Friday night, and I found a nice official documentation website:

Aioredis. Readthedocs. IO/en/latest/g…

Careful friends may find that this is not and Httprunner’s official website looks very similar ah.

Right after I discovered this new world, I couldn’t stop.

Let’s start with his domain name: readthedocs.org, but many other projects have similar official documents.

Considering Httprunner made such a handsome website, we can’t say we want to catch up with him (after all, he still has a few brush), but we need to look like him and complete the website.

So I have a website like this:

Pity. Readthedocs. IO/requirement…

You don’t say, is it still like a decent? Last night, page + document + document today, until now.

I’d like to call myself the emperor of the liver, because I did it at 3 o ‘clock last night. Later I will publish article to teach you how to do!

Back to today’s topic

As the old saying goes: world events, long will be united long will be divided! In our front and back ends here, in fact, can also be on and off! Listen to me slowly ~

Jimeimeng, who is familiar with the platform, should know that the front end of the project is developed by React, which is an independent service. There is no templates or static resource data in the back end.

Before-and-after separation is stripping static resources in flask/ Django, then before-and-after merge (my own random name) is stuffing it back into the flask!

Do it today, now!! Let’s start with my own official pros and cons.

Understand the routing

When we do a project that separates the front end and the back end, we have a URL on the front end like we used to:

/user/login, and some static resources such as images, JS, CSS, etc.

Once merged, think about whether it might match the routing strings we defined in the FastApi. If they are Both Chinese dogs, we can call them strings.

Front-end Route Type

In fact, there are two types of front-end routing. The first is the browser mode, which is the same as normal routing. For example:

But there is another type of routing that you may have seen in your company is the hash type:

If you see the /#/ in the middle, that is the hash route flag. In fact, there is no difference for us users to use, it is sensory.

Hash routing gives us the benefit of avoiding strings. Because hash routing changes do not cause the browser to send requests to the server.

If you have too much to look at, switch to the next section.

After the end of the article only need an address, there are all kinds of portal!

pity.readthedocs.io/