You don't need to limit it to only use the Joplin server though. You might as well use the sync code from Joplin and make the web app just another Joplin client syncing with any supported sync target type.