gpt4 book ai didi

linux - 本地主机 :9000 takes too much time load in play framework

转载 作者:太空宇宙 更新时间:2023-11-04 12:23:17 28 4
gpt4 key购买 nike

我正在使用 play 2.4 我的 play 应用程序运行良好,然后我需要安装一些 UI 组件,如 graunt bower ruby compass 安装这些组件后,当我在 reload clean compile 之后执行 activator run 并点击 localhost: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...)

我已经研究过关于这个主题的其他答案,但没有一个对我有用,请帮忙

最佳答案

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

关于linux - 本地主机 :9000 takes too much time load in play framework,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45462705/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com