关于web-dev-server 记录
package.json
"scripts": {
"init": "webpack --progress --config webpack.dev.config.js",
"dev": "webpack-dev-server --inline --hot --compress --history-api-fallback --config webpack.dev.config.js",
"build": "webpack --progress --hide-modules --config webpack.prod.config.js"
},
server.js —— 类似express构建http服务
'use strict'
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
config.entry.unshift('webpack-dev-server/client?http://localhost:8090', "webpack/hot/dev-server");
config.plugins.push(new webpack.HotModuleReplacementPlugin());
// 这里配置:请求http://localhost:9090/api,
// 相当于通过本地node服务代理请求到了http://cnodejs.org/api
var proxy = [{
target: "https://cnodejs.org",
host: "cnodejs.org",
path: "/api/*"
}]
//启动服务
var app = new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot:true,
historyApiFallback: true,
proxy:proxy
});
app.listen(8090);
关于web-dev-server 记录的更多相关文章
- [转载]部署Office Web Apps Server并配置其与SharePoint 2013的集成
Office Web Apps Server 是新的 Office 服务器产品,它提供 Word.PowerPoint.Excel 和 OneNote 的基于浏览器的版本.单个 Office Web ...
- 部署Office Web Apps Server并配置其与SharePoint 2013的集成
部署Office Web Apps Server并配置其与SharePoint 2013的集成 Office Web Apps Server 是新的 Office 服务器产品,它提供 Word.P ...
- office web app server部署和简单操作
部署环境:windows server 2012 R2,服务器在AD域中 参考网址: https://msdn.microsoft.com/zh-cn/magazine/jj219455(office ...
- 攻防世界Web刷题记录(进阶区)
攻防世界Web刷题记录(进阶区) 1.baby_web 发现去掉URLhttp://111.200.241.244:51461/1.php后面的1.php,还是会跳转到http://111.200.2 ...
- web cache server方案比较:varnish、squid、nginx
linux运维中,web cache server方案的部署是一个很重要的环节,选择也有很多种比如:varnish.squid.nginx.下面就对当下常用的这几个web cache server做一 ...
- Office Web Apps Server 概述
Office Web Apps Server 是新的 Office 服务器产品,它提供 Word.PowerPoint.Excel 和 OneNote 的基于浏览器的版本.单个 Office Web ...
- office web apps server 问题和解决办法
New-OfficeWebAppsFarm –InternalURL "http://owa.zjkhlib.com" –AllowHttp –EditingEnabled 错误1 ...
- Office Web Apps Server
Office Web Apps Server Office Web Apps Server 是一款 Office 服务器产品,可提供针对 Office 文件的基于浏览器的文件查看和编辑服务.Offic ...
- office web apps server安装部署
操作系统:windows 2012 软件下载地址: 链接:https://pan.baidu.com/s/1c3WWFs8 密码:4dcy NDP452-KB2901954-Web.exe(.Net ...
- Simple Web API Server in Golang (2)
In this challenge, I tried to implement a simple OAuth2 server basing on Simple Web API Server in [1 ...
随机推荐
- 纯window下VMware 安装 OS X El Capitan 原版映像【未完待续】
一.所需软件1.下载OS X El Capitan 10.11.2 15C50链接:http://pan.baidu.com/s/1skuLgAx 密码:u2jf 2.下载VMware Worksta ...
- hdu 1087 Super Jumping! Jumping! Jumping! 简单的dp
Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 ...
- SpringMyBatis解析2-SqlSessionFactoryBean
通过分析整合示例中的配置文件,我们可以知道配置的bean其实是成树状结构的,而在树的最顶层是类型为org.mybatis.spring.SqlSessionFactoryBean的bean,它将其他相 ...
- iOS10 UI教程层次结构的事件
iOS10 UI教程层次结构的事件 iOS10 UI教程层次结构的事件,层次结构中存在7个事件,对于这些事件的介绍如表1-3所示.通过这些事件,可以监听视图,当视图在层次结构上发生变化时可以被拦截,也 ...
- aapt命令介绍及常用命令实践
D:\>aapt -h ERROR: Unknown command '-h' Android Asset Packaging Tool Usage: aapt l[ist] [-v] [-a] ...
- JavaScript eval() 函数
定义和用法:eval() 函数可计算某个字符串,并执行其中的的 JavaScript 代码. 语法:eval(string) 参数 描述 string 必需.要计算的字符串,其中含有要计算的 Java ...
- Codeforces 682C Alyona and the Tree(树形DP)
题目大概说给一棵点有权.边也有权的树.一个结点v不高兴当且仅当存在一个其子树上的结点u,使得v到u路径上的边权和大于u的权值.现在要不断地删除叶子结点使得所有结点都高兴,问最少删几个叶子结点. 一开始 ...
- uva 107 - The Cat in the Hat
The Cat in the Hat Background (An homage to Theodore Seuss Geisel) The Cat in the Hat is a nasty c ...
- ural 2065. Different Sums
2065. Different Sums Time limit: 1.0 secondMemory limit: 64 MB Alex is a very serious mathematician ...
- 期待中冷静前行,专家预测2017年VR产业5大发展趋势
VR在90年代火过一阵后,在2016年迎来了爆发.今年的VR领域,除了Oculus.HTC.索尼等发布的各家硬件,还有许多VR内容争奇斗艳的迸发,但是VR会一直保存热度吗? 事实上,对于科技圈巨头而言 ...