localhost

webpack-dev-server can't find localhost

99封情书 提交于 2019-12-05 02:37:27
I'm trying to get started with React using webpack , but keep running into an error when I try to set up webpack-dev-server . I ran npm install webpack-dev-server followed by webpack-dev-server and the command line returns the following: events.js:154 throw er; // Unhandled 'error' event ^ Error: getaddrinfo ENOTFOUND localhost at errnoException (dns.js:26:10) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26) Any clues on what is happening here? I don't really know how webpack works to try and search for the root of the problem, but I've also been developing a website using PHP at

Possible to simulate several concurrent connections to test a nodejs app

感情迁移 提交于 2019-12-05 02:05:02
问题 I have a simple node.js /socket.io (websockets) application running @localhost. I am trying to see how many concurrent connections it can handle. Is it possible to simulate several concurrent users on localhost itself ? This is my half baked attempt using socket.io-client: function connectAndSend(){ socket.emit('qand',{ code :'ubuntu' }); } socket.on('connect', function () { }); socket.on('q', function (data) { console.log(data); }); function callConnect(){ console.log('calling');

How to point my localhost to a public ip address [closed]

佐手、 提交于 2019-12-05 02:05:00
I have just set up a WAMP 2.2 localhost on my computer. I have everything running properly (I can execute PHP, MYSQL, etc...) and am now wondering how I would point my localhost to a public ip-address that could be accessed outside of my network. Is this possible? If so, how would I do that? Thanks! EDIT: Specs: windows, wamp 2.2.... Needed just to serve MYSQL and MYSQLI databases, php, html, js, and css files to people outside of my network. I prett much want ot create a basic website with my localhost. dpn Have a look at localtunnel . Very handy for services that callback to your server

HTML5 - WebSocket

我只是一个虾纸丫 提交于 2019-12-05 02:00:28
1.什么是WebSocket WebSocket是HTML5新增的协议,它的目的是在浏览器和服务器之间建立一个不受限的双向通信的通道。 简单点说就是让浏览器和服务器之间可以建立通信通道,任何一方都可以主动发消息给对方。 2.为什么会出现WebSocket,与HTTP协议的区别 HTTP协议是请求 - 应答机制,只能由浏览器发起请求,服务器不能主动推送信息。所以对于一些实时要求较高,海量并发的应用就显得不那么好用。 比如在浏览器中的实时聊天,金融证券的实时消息等。 此前对于推送技术,用的都是轮询,在特定的时间间隔,浏览器自动发出请求,将服务器的消息主动拉回来。这种情况下,我们需要不断的向服务器发送请求,这种方式的缺点也是显而易见的, 一是实时性不够 二是可能一个很小的数据就包含很长的header, 占用了了大量的带宽和服务器资源。 三是频繁的请求也给服务器带来了极大的压力 所以HTML5推出的WebSocket应运而生,让浏览器和服务器之间可以建立无限制的全双工通信,任何一方都可以主动发消息给对方 为什么WebSocket连接可以实现全双工通信而HTTP连接不行呢?实际上HTTP协议是建立在TCP协议之上的,TCP协议本身就实现了全双工通信,但是HTTP协议的请求-应答机制限制了全双工通信。WebSocket连接建立以后,其实只是简单规定了一下:接下来,咱们通信就不使用HTTP协议了

tomcat使用

孤者浪人 提交于 2019-12-05 01:53:48
修改端口号 * 修改端口号,%CATALANA_HOME%\conf\server.xml,修改<Connector port="8080">,把8080修改了即可。 * http协议默认端口为80,也就是说http://localhost,等同与http://localhost:80 如果把Tomcat端口号修改成80,那么访问服务器就可以无需再给出端口号。 外部应用既是把应用程序不放到Tomcat的wabapps目录下!而已放在外面,例如:F:/hello 二种方法: 1. 在conf/server.xml下配置,指定外部应用的路径。 <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Context path="cast_hello" docBase="F:/hello"/> </Host> * 在<Host>元素下添加<Context>元素,path为URL访问路径,docBase为外部应用的真实目录。 * 在浏览器地址栏中访问:http://localhost:8080/cast_hello/index.html 2. 在conf/catalana/localhost下添加配置文件,指定外部应用路径 * 在conf/catalana

Jenkins持续集成

ぃ、小莉子 提交于 2019-12-05 01:43:36
一、Jenkis介绍 Jenkins是一个开源软件项目,是基于Java开发的一种持续集成工具,用于监控持续重复工作,旨在提供一个开放易用的软件平台,软件的持续集成变为可能。目前一个互联网产品的形成,从开发到上线,已经形成了一套标准流程:编码→ 构建→ 集成→ 测试→ 交付→ 部署,从测试之前可以看作是一个持续集成的过程 持续集成(Continuous integration,简称CI)指的是,频繁地(一天多次)将代码集成到主干上,持续集成的目的,就是让产品可以快速迭代,同时还能保持高质量。他的核心措施是,代码集成到主干之前,必须通过自动化的测。只有一个测试用例失败,就不能集成 二、下载安装 下载地址:http://updates.jenkins-ci.org/,提供了Windows、Linux和OS X平台的安装包,最简便的是war包直接启动,此时必须保证系统已经安装了JDK,最好是jdk1.5以上 已经安装了JDK的情况下第一种启动方法:切换到jenkins.war的存放的目录,输入如下命令 java - jar jenkins.war 如果需要修改端口号可以使用如下命令 java -jar jenkins.jar--httpPort=8081 然后在浏览器中(推荐用火狐)输入localhost:8081,localhost可以是本机的ip,也可以是计算机名

htaccess password protect but not on localhost

醉酒当歌 提交于 2019-12-05 01:42:30
I have set up a dev site and want to password protect it so only validated visitors can view the site. All well and good. I am getting annoyed, on my local version, entering my username and password. So, without changing the htaccess file between my local copy and the one on the dev site, how do I password protect the site but allow myself access without having to enter my username and password? Something like this should do the trick.. Require valid-user Allow from 127.0.0.1 Satisfy Any From: http://httpd.apache.org/docs/2.0/mod/core.html#satisfy I've figured out a cool way to seperate Linux

Is it possible for me to do the performance testing in localhost with actual network environment?

送分小仙女□ 提交于 2019-12-05 01:36:54
问题 I need to test the performance of application running on localhost as if it were in the online environment. I mean the performance test conducted by the network traffic simulation, limited bandwidth simulation, or other parameter as if it were online. Could Apache Ab do the simulation? 回答1: We've used Charles and Firefox Throttle in the past to simulate slow networks. 回答2: Yes, but you will need to connect to your application by IP address, not "localhost" or 127.0.0.1. Typically for web

WAMP server, localhost is not working

你说的曾经没有我的故事 提交于 2019-12-05 00:50:05
My WAMP server localhost was broken when my Windows 7 updates automatically. My port 80 is already used by IIS server. I searched on website, many people suggested that I need to change the port 80 to port 8080 or something difference. I updated Listen:80 to Listen:8080 and ServerName localhost to ServerName localhost:8080 . But it is still not working and leaves me a blank page. Can anyone help me to solve this problem? Goto This link its working.. http://www.ttkalec.com/blog/resolving-yellow-wamp-server-status-freeing-up-port-80-for-apache/ Update: Using XAMP After I’ve written this blog

Mac下配置Apache + Php + Mysql环境

≯℡__Kan透↙ 提交于 2019-12-05 00:42:39
Apache与PHP的配置 Mavericks同以往的OSX一样自带了apache2.2.24和php 5.4.17,但默认情况下没有开启,打开终端 sudo apachectl start 这时在浏览器中输入localhost应该就会出现apache标准的It Works! 下面开启php,修改apache配置文件 sudo vim /etc/apache2/httpd.conf 找到 #LoadModule php5_module libexec/apache2/libphp5.so,去掉前面的# 默认的www文件夹非常不方便,还是改成在home里开发起来比较顺手,修改apache配置 ,还是上面的文件 #将引号中的目录修改为自己的目录 DocumentRoot "/Library/WebServer/Documents" ...... #将引号中的目录修改为和上面一样的目录 <Directory "/Library/WebServer/Documents"> 在自己的目录中创建文件index.php,写入 <?php phpinfo(); ?> 在浏览器中访问localhost,应该显示出php的info页 MySQL与phpMyAdmin的安装与配置 到MySQL官网上下载最新的MySQL版本 http://dev.mysql.com/downloads/mysql/ ,