To run locally, yarn
, then yarn dev
, then open https://localhost:8000.
gandalftheblue / gandalftheblue Goto Github PK
View Code? Open in Web Editor NEWPersonal blog at: https://gandalftheblue.github.io/gandalfTheBlue/
License: MIT License
Personal blog at: https://gandalftheblue.github.io/gandalfTheBlue/
License: MIT License
To run locally, yarn
, then yarn dev
, then open https://localhost:8000.
由于项目用到443端口,用 IDEA 启动的时候显示 permission denied。
这个时候我们需要用 ROOT 权限来启动 IDEA。其中一个方法就是在命令行用 SUDO 启动 IDEA:
sudo /Applications/IntelliJ IDEA CE.app/Contents/MacOS/idea
由于是开发环境,所以不会有安全方面的问题。
最近发现一个奇怪的问题,React项目在IE上刷新的时候会出现404错误。
项目背景:
1, 利用 create react app 构建
2, 部署在tomcat上
3, 采用client-side 路由
由于是客户端路由,我们在tomcat里面配置如下:
<error-page>
<error-code>404</error-code>
<location>/index.html</location>
</error-page>
根据以上的配置,我发现项目在除了IE的情况下,F5刷新都可以重新加载项目,而在IE下刷新就会出现上面的错误页面。
经过一番研究,造成这个问题的原因是IE 的 Friendly HTTP Error Pages
我们的tomcat每次返回404然后返回index.html的时候,我们的Index.html是小于512 bytes,IE 就会替换Index.html为它自己的错误页面,也即最开始出现的错误页面。
知道了造成问题的原因后,解决问题就很简单,在Index.html里面添加字符使其大于512 bytes。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.