JacksonTian / ping

一个您会喜欢的基于Node的Web开发框架。【学习研究所用,请勿用于生产环境】

Home Page:http://weibo.com/shyvo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

为什么服务器响应速度非常慢

tsj1107 opened this issue · comments

image
为什么html和css文件响应速度非常慢 多达2分钟呢

你用在了什么场景捏?

我在assets内放了个文件夹 里面就是一个html静态页面和css js文件 每次修改代码刷新都要等待差不多2分钟 我看了下network 在静态文件夹里的文件就过来的很慢

这个项目是我当时研究和学习node所写的。有一年没维护了。用成熟的框架吧。connect/express

用来研究和学习还可以。如果你是生产需要的话,不要使用。

555 好吧 其实我就是想简单弄个静态服务器看页面的 flashplayer必须在容器下才能实现功能

npm install anywhere -g
cd your folder
anywhere

用这个方案代替下。

貌似不错 let me try try .

@azur ➜ ~ npm install anywhere -g
npm http GET https://registry.npmjs.org/anywhere
npm http 200 https://registry.npmjs.org/anywhere
npm http GET https://registry.npmjs.org/anywhere/-/anywhere-0.0.2.tgz
npm http 200 https://registry.npmjs.org/anywhere/-/anywhere-0.0.2.tgz
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/anywhere'
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/anywhere']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/anywhere',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/anywhere',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53',
npm ERR! 'Object.oncomplete (fs.js:93:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 12.2.1
npm ERR! command "node" "/usr/local/bin/npm" "install" "anywhere" "-g"
npm ERR! cwd /Users/azure
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR! path /usr/local/lib/node_modules/anywhere
npm ERR! fstream_path /usr/local/lib/node_modules/anywhere
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/anywhere'
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:93:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/azure/npm-debug.log
npm ERR! not ok code 0

sudo npm install anywhere -g

加下sudo

握爪 您是好人!

能再问个问题吗 https://github.com/mojombo/jekyll/wiki/Install jekyll你用过吗
总提示我You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.
但是mac下又不能用sudo apt-get install ruby1.9.1-dev 这个 说是apt-get 没有这个命令

apt-get是ubuntu或debian的命令。你试试homebrew。不过要先装homebrew

brew search ruby
brew install ruby

装了很大的ruby还是没用 算了 睡觉了 谢谢你~