Hey All,
As I was going for a run this morning, and as I’m always thinking about my project, Wappler and future-proofing my platform architecture and deployment plans, I started thinking about separating my front-end and back-end (but both still being in Wappler)
The main use-case was about having a the database existing on a different server/instance than the front-end web data and still being able to deploy and update both in Wappler.
Currently my project is set up as a NodeJS / Docker project, with everything in the docker image
I figured there were two ways to go about this:
- Set up a new database, with its own IP and credentials etc
- Create a new DB connection in DB manager
- Go into all the server connect files/steps and simply change the DB connection in each step/file
- The front-end will now work the same, the server connect calls will simply connect to a different DB connection.
Ok, so this isn’t really separating the font and back end, its relaly like a normal project, but being that i’m currently on a Docker project it is using a DB outside of the docker image.
The problem is its still really all deployed as one App, font and back end together.
- (this is the real way I think)
-
Create new Wappler project
-
Clone all the my existing Server Connect action file/steps etc
-
Set up a new DB connection for a regular DB sitting on a server
-
Save project, no need to build any front end or web interface.
-
Go back to existing project
-
Change all current server connect elements in the front-end to an API data source and point to the endpoints just created in back-end Wappler project
*Update all forms etc to be API forms instead of SC forms, same as above
Hey Presto! Separate front-end and back-end projects. They can be managed and deployed separately through Wappler.
So… How is my logic? Is this roughly how it would be done?
What’s some of your thoughts on this approach?
Cheers!
Last updated: