本地主机:9000花费太多时间负荷发挥框架

本地主机:9000花费太多时间负荷发挥框架

问题描述:

我使用打2.4我的打法应用程序工作正常,然后我需要的时候我做activator run安装这些组件后,安装像grauntbowerrubycompass一些UI组件reload clean compile后,打本地主机:9000这需要近半个小时或更长时间加载该页面,并在控制台上有什么不同之处本地主机:9000花费太多时间负荷发挥框架

--- (Running the application, auto-reloading is enabled) --- 

[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000 

(Server started, use Ctrl+D to stop and go back to the console...) 

我已经看着其他的答案堆栈这个话题,但他们没有为我工作,请帮助

+0

也欢迎你如果发表评论有是somethi ng错误我在downvoting谢谢之后问,所以我会知道我的错误 – swaheed

+0

是的,你是我的确在做的事。我会帮助 –

+0

请如果你知道关于这个问题的一些事情,请告诉我谢谢 – swaheed

please make sure your public folder stuff or node_modules are not being compiled, because if they will compile with ur application you'll be stuck like that always.

步骤,你也可以按照 - >

> stop play 
> delete folder where your code compiles. There will be also a node_module folder that will be taking time too much. 
> Again compile it with clean, but make sure in your compiled file, node modules folder is not being compiled. 

In build.sbt, (This is just a way to do these stuff, the syntax might change in different version of play framework)

import play.sbt.PlayImport.PlayKeys.playRunHooks 

lazy val gulpDirectory = baseDirectory { 
    _/"admin-panel" 
} 

excludeFilter := HiddenFileFilter -- ".tmp" 

unmanagedResourceDirectories in Assets <+= gulpDirectory { _/"dist"} 

unmanagedResourceDirectories in Assets <+= gulpDirectory { _/".tmp"} 

unmanagedResourceDirectories in Assets <+= gulpDirectory { _/"bower_components"} 

//this is for development environment 
unmanagedResourceDirectories in Assets <+= gulpDirectory { _/"src"/"app"} 

playRunHooks <+= gulpDirectory.map(path => Gulp(path)) 

If this is not working, we can try this as well.

mappings in (Compile, packageBin) ~= { _.filterNot { case (_, name) => 
     name.startsWith("public\\node_modules") 
}} 

你也可以访问该链接

https://www.playframework.com/documentation/2.4.x/SBTCookbook

+0

我得到一个错误[错误]在表达式中输入错误 项目加载失败:(r)etry,(q)uit,(l) ast,还是(i)gnore? r [info]从/ home/sara/git/arteciate/project加载项目定义 /home/build.sbt:106:error:not found:value Gulp playRunHooks Gulp路径)) – swaheed

+0

https://*.com/questions/32000681/include-exclude-asset-folder-directory-in-sbt-play-framework/37356485,请参考此链接是否有帮助 –