Kiss comes as a complete system that includes both the front-end and back-end. This works well for most situations. However, sometimes a web application may have a single back-end that serves several different front-ends. Or, perhaps you prefer to keep the front-end and back-end projects separate. Kiss has a mechanism to support the ability to split the front-end and back-end.
This chapter will detail the steps needed to accomplish this.
A back-end-only system is a complete system minus the front-end portion of the system. The git repo is also deleted since it is meaningless in this scenario.
In order to create a back-end-only system you start with a complete Kiss system cleanly checked out and delete the front-end portion. That leaves you with a back-end-only system. However, before doing that, you must install the third-party libraries. The following commands will accomplish this whole process.
./bld libs (Linux or Mac) ./remove-frontend remove or bld libs (Windows) remove-frontend remove
Once these commands have been run, what you have left is a back-end-only system. The git repository it came in will have been deleted as well as the front-end portion of the system. The procedure for developing, deploying, and upgrading the system will be slightly modified as described herein.
The main difference between developing on a back-end-only system vs. a whole system is just that the command used to start the back-end is slightly different. The locations of all the back-end pieces are the same. Once running, the system may be modified while running just the same.
Use the following command to build and run the back-end:
./bld developBackend (Linux or Mac) or bld developBackend (Windows)
Viewing the server log is done in the same way as before.
Deploying the back-end is done just as before except now, instead of a single file containing the whole system, you have a single file that represents the back-end only. When deploying the front-end and back-end portions, they will be treated as two separate systems by the server.
Upgrading a back-end-only project is done the same way as upgrading a full system except that after the upgrade, you’ll need to run the
remove-frontend
script again. See System Updates
A front-end-only system is a complete system minus the back-end portion of the system. The git repo is also deleted since it is meaningless in this scenario.
In order to create a front-end-only system you start with a complete Kiss system cleanly checked out and delete the back-end portion. That leaves you with a front-end-only system. However, before doing that, you must install the third-party libraries. The following commands will accomplish this whole process.
./bld libs (Linux or Mac) ./remove-backend remove or bld libs (Windows) remove-backend remove
Once these command have been run, what you have left is a front-end-only system. The git repository it came in will have been deleted as well as the back-end portion of the system. The procedure for developing, deploying, and upgrading the system will be slightly modified as described herein.
Before running the front-end, you should start the back-end as described above.
There are no steps required to edit front-end files. However, you must serve them. This can be accomplished with the following command:
./serve (Linux or Mac) or serve (Windows)
Presuming the back-end is running, you can access the running system at http://localhost:8000
As before, you can edit front-end files while the system is running.
The front-end must be distributed as a separate war file named frontend.war. This file can be created with the following command:
./make-frontend (Linux or Mac) or make-frontend (Windows)
From your server’s perspective, the front-end and back-end are two different systems.
Upgrading a front-end-only project is done the same way as upgrading a full system except that after the upgrade, you’ll need to run the
remove-backend
script again. See System Updates