Leisure Moment

乱花渐欲迷人眼,浅草才能没马蹄。最爱湖东行不足,绿杨阴里白沙堤。


  • Home

  • Archives

  • Tags

  • About

  • Sitemap

Hello World

Posted on 2018-08-09

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

在mac上部署flask+mod_wsgi+apache

Posted on 2018-04-02
  1. 安装mac brew工具,brew -v 命令测试
  2. brew install apache2, 安装完会注意log message, 会显示配置文件http.conf文件在哪,我是在/usr/local/etc/httpd/httpd.conf
  3. 安装mod_wsgi模块
    a. ./configure
    b. make
    c. make install

  4. 修改httpd.conf,配置虚拟主机映射到本地。

  5. lsof -i 端口号 检查端口号是否被占用

前端学习中的困惑

Posted on 2017-12-24

Questions

  1. 为什么vue打包的后静态资源通过浏览器打开是空白页:https://www.zhihu.com/question/62164638/answer/196212610

  2. 为什么在某机起的http服务,同一子网内的机器访问不了?
    通常情况下是端口和host的问题,这里注意不能把Host设置为127.0.0.1(设置为回环地址。该地址指电脑本身,主要预留测试本机的TCP/IP协议是否正常。只要使用这个地址发送数据,则数据包不会出现在网络传输过程中)。绑定为0.0.0.0,在服务器中,0.0.0.0指的是本机上的所有IPV4地址,如果一个主机有两个IP地址,192.168.1.1 和 10.1.2.1,并且该主机上的一个服务监听的地址是0.0.0.0,那么通过两个ip地址都能够访问该服务。

  3. webpack加载动态图片资源
    利用require.context 会在当前创建一个资源上下文,相关资源都会被最终打包。

    1
    2
    3
    const context = require.context('../images', true,  /^\.\//)
    let fileName;
    let img = context(fileNmae)
1…345…8
zhong-wei

zhong-wei

23 posts
3 categories
7 tags
RSS
© 2016 - 2019 zhong-wei