关于django+vue工程部署到服务器上遇到的问题

一、前台有错误,前台请求后台接收不到

由于之前一直是在本地运行调试网站,前台请求后台都是http://localhost:8000/api/这样类似的,也一直没有问题,等到部署到服务器上时就卡主了,后来发现得把localhost换成当前ip,貌似可以用window.location.host来获取主机ip

二、前台正确的情况下,网站后台接收不到请求

一般是服务器没运行起来,但我可能比较特别,我一直使用python3 manage.py runserver 127.0.0.1:8000 在服务器上启动后台,然后根本接收不到请求,百度了半天,一个个解决方案去试,后来发现应该用python3 manage.py runserver 0.0.0.0:8000,这个127.0.0.1,和0.0.0.0广播地址有点搞不明白为什么,之后有时间再来百度理解一下,为什么

三、前台axios请求等待返回值后再执行

前面加个await就可以了,这次找bug感觉对前后台请求更为了解了,下次碰到前台发请求后台无响应net refused这种,在服务器上估计就是地址错了,或者服务器没有运行对地址,django如果接受到了get和post请求一定会显示在控制台上,但是如果换成java,下次查查有没有日志显示get和post请求历史日志

“关于django+vue工程部署到服务器上遇到的问题”的156个回复

  1. In Advances in Pharmacology priligy india L acquisto del Viagra online ГЁ sicuro in Italia e l ordinando nella nostra farmacia, ricevi anche una serie di vantaggi, per esempio una consegna veloce in qualsiasi regione e un basso costo dei farmaci

  2. Kristin is a contributing writer for Byrdie where she specializes in product reviews. For a bold, sleek eyeliner look, choose The Feline Flick liquid eyeliner pen for precision. This expert eyeliner pen in Panther is the perfect liner for precise application with it’s fine-tipped calligraphy brush and ergonomic rubber handle for ultimate control. Read our step-by-step tutorial below to learn how to apply eyeliner for a sexy, cat-like makeup look! I’m a mom of two girls with a baby boy due this September. I’m passionate about creating a positive online community for women to help them make the most of each and every day! Staying power: Sadly, the Sugar Eye Told You So Smudgeproof Eyeliner doesn’t live up to its smudgeproof claim. Forget of staying for 24 hours without smearing, the formula starts breaking mildly from the outer corners of my eyes after 6 hours only. It’s performance is just the same as that of Maybelline hyper glossy and L’oreal magique eyeliner. The oil on my skin ate the eyeliner and it did nothing to stop that рџ™Ѓ Even if you slightly rub off your eyes, this will flake. https://www.greyhoundsolutions.com/community/profile/noeliaschiffman/ EM01Massage Gun Professional Handheld Electric Body Massager for Pain Relief, Deep Tissue Percussion Cordless Massage Device for Sore Muscle After a long day of sweating under the scorching sun, the Everyday Humans Take Five Reviving Aloe Mist will be like an ice bath for your face (without that frostbite feeling). Prickly pear, aloe vera, and cucumber water sync up for an instantly hydrating, soothing, and cooling experience.  Each skincare tool is unique and may slightly vary in color and size. What is Gua Sha? Gua sha (pronounced gwah-shah). ‘Gua’ means scrape, and ‘Sha’ means sand. Gua sha is a traditional facial massage technique that uses gemstone tools to relieve tension in the muscles of the face, boost circulation, and encourage lymphatic flow and drainage for healthy, clear, more youthful looking skin. It’s even been dubbed the “Eastern Facelift”! Gua Sha tools have traditionally been used in Chinese medicine to massage and scrape the entire body, with a closer attention to the neck and back.

  3. Bitcoin is one of the most safest traditional currencies that a user can use without displaying their personal information. This basically resulted in the evolution of Bitcasino. To all the users who are surfing myriads of websites to gather quality information about Bitcasino. This is one of the best reviews that you can easily consider. As it can seriously work wonders for your case. Here we have covered some of the best parameters of Bitcasino that can seriously help you decide whether you want to invest in this platform or not. The Curacao government regulates Bitcasino. The licence number is 1668 JAZ, which makes it one of the very few casinos that accept Bitcoin that are legit. Furthermore, as Bitcoin is based on blockchain technology, it enhances the safety aspects of the online casino. As a legit gambling site, Bitcasino.io is inclined towards social responsibility and thus ensures the utmost transparency and safety to its players. https://creafuture.ro/forum/profile/elvaholm602538/ Guests staying at the hotel can sit down to a unique dining experience at the in-house restaurant, suitably based for those who want to stay nearby at mealtime. In the evening, guests can wind down in the lounge bar. Rooms Make yourself at home in one of the 164 air-conditioned guestrooms. Complimentary wireless Internet access keeps you connected, and cable programming is available for your entertainment. Private bathrooms with shower tub combinations feature complimentary toiletries and hair dryers. Conveniences include desks and irons ironing boards, and housekeeping is provided daily. The rooms have private bathrooms with hairdryers, showers and toiletries.See 50 pictures for Par A Dice Hotel Casino at 21 Blackjack Blvd, East Peoria, IL, 61611 81В°F East Peoria , IL. Each guestroom is tastefully appointed and equipped with modern conveniences. The property is ideal for a variety of recreational activities. Three excellent reasons to stay at Par-A-Dice are the friendly staff, excellent facilities, and close proximity to everything East Peoria (IL) has to offer.

  4. Magic mushrooms and magic truffles can be compared on a number of levels, but the most frequently asked questions are: what are the strongest magic truffles? And which magic mushroom is for beginners? In this article we hope to give you an attractive overview of the differences and similarities between the magic mushrooms and truffles in our collection. We will do our best to keep it up-to-date. Pink Paradise Magic Truffles Sugar, Cocoa Butter 32.8%, Dried Passionfruit Juice (Sugar, Passionfruit)17.3%, Emulsifier: Soy Lecithin, Milk, Psilocybin Cubensis. That could be the reason why high doses report a sense of unity that transcends beyond themselves. But, most importantly, mushroom psilocybin increases connectivity between different regions of the brain. That receptor activation causes a profound change in how different areas of the brain synchronize with each other. Think of it as an orchestra; typically, the brain has different musical groups that each play independently; a sextet there, a quarter on the other side, etc. However, once psilocybin enters, it’s like the brain suddenly has a conductor. Areas of the brain that are usually compartmentalized begin to communicate. That’s what magic mushrooms do to your brain. https://happynailsdayspafl.com/community/profile/lorenemsi087591/ Our team of medical marijuana researchers and medical cannabis doctors have compiled a list of questions and answers. Commonly asked Washington medical marijuana card and renewal questions can be found here. Our physicians and healthcare providers in Washington, PA are all certified and have extensive training with medical marijuana. Most states do not require any education on medical marijuana, but we do! We are much more than a certification center: we actually offer patients ongoing care based on their individual needs to ensure they are getting the support, care, and guidance they need throughout the entire process. Some medicinal cannabis products only contain the non-psychoactive cannabinoid, cannabidiol (CBD). These products are classified as Schedule 4 (S4) medicines (prescription only medicines). The Poisons Standard (external site) allows “cannabidiol only” medicinal cannabis products to also contain very low levels of tetrahydrocannabinol (THC) – up to 2 percent of the total cannabinoid content.

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注