简体   繁体   中英

Working on a multiple leiningen project

I'm building a web apps that uses http-kit and clojurescript. At some point, I want to separate the front and back each into a lein project on its own. The scenario is:

  1. For the front, if on development mode, uses a lein ring server to serve directory and the app will display a mock data.

  2. The back will serve any resources/public in the front lein project.

I'm thinking of doing a nested lein project, but not sure how to handle it. Any suggestion or pointer is very much appreciated.

The way your question is posted it is not very clear " why two projects?". It seems that you may be confusing different projects with different profiles , eg .. classpaths?

In order to work with multiple lein projects at once, similar to the way you would work with master pom => child poms with maven, there is a lein-sub .

But in your case, it seems that what you want is different lein profiles , classpaths. Take a look at lein profiles documentation, it should solve "in dev do this, in test do this, in production do this" behavior you are after.

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