convert app to js