简体   繁体   中英

Playframework 2.5.x 2 Project On 1 Server

I Actually new using playframework.

Usually im using j2ee & jboss, and now im migrating to playframework.

in j2ee using jboss, if i have 2 .ear project, for example, 1 for ecommerce engine and another for payment engine, in production i can just put that 2 .ear project into jboss.

the question is, how if im using play?

do i have to create 2 play project and run both app?

or i create just one project contain 2 database and configuration?

Thanks.

1 - You would have to build something like this by using subprojects.

https://www.playframework.com/documentation/2.5.x/SBTSubProjects

In case your projects are independent, consider using nginx as a front end server: set up with nginx . It shoud route user connections to different play applications depending on the url string, usually, on the domain part. Your applications should run on different ports, such as 9001, 9002, etc. This setup allows you to update aplications, turn them on and off, move them between different servers independently.

The accepted answer suggests using subprojects, it is a good idea, but their intent is not in uniting several application into one; it is more in logical split of you project, and in speeding up the compilation. Another point, that you may like in subprojects, is that different play applications run in different JVMs, so this may be an issue if you server resources are limited.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM