라이브 앱 코드 테스트 수정 사항이 프론트엔드에 반영되지 않음

Hi,

Coming from developing on joomla/wordpress I am curious over discourse backend file modification functionning through docker.
I have read the documentation on how to create a plugin(How can I make my own Discourse plugins? - #2 by merefield), but I don’t want to do that yet, I just want to be able to test code live

On a non docker MVC installation, doing a modification on a file via ftp, it was instantly reflected and while with docker I understand the need to rebuild the app to apply permanent modification, what if you want to test things live?

Live test code modifications don’t seem to work :

For example, I want to disable searches for anonymous users so I edited :
/var/www/discourse/app/controllers/search_controller.rb by adding “if current_user.present?” after “def show” with an end at the bottom of the function.

I was surprised that this does not have any effect on front end, and even renaming the conrolller to search_controllerold would not have any effect on the searches.

But somehow, renaming an image in /var/www/discourse/public/images# would hide the image on front-end :slight_smile: !

Can anyone please tell me how things work here, is there another cached version of the system more than just the app that starts from its image?

Thank you

Ok, I found that code gets modified if I modify the files in ./javascripts/discourse/node_modules/.embroider/rewritten-app/
It feels better now :slight_smile:

그건 안티패턴을 넘어서는 것 같습니다.

아마도 빌드될 때마다 대체될 가능성이 높습니다.

#documentation:developer-guides의 자료와 수많은 실제 오픈소스 예시를 참고하여, #customization:theme-component를 통해 프론트엔드를 수정하고, #customization:plugin을 통해 프론트엔드와 백엔드를 모두 수정하는 방법을 확인해 보세요.

Thank you for the share ! I will check this and maybe get involved into it more seriously at some point, for the moment I just wanted to test live modifications and don’t get why they don’t show up in front end as easy as it was with an ftp on joomla/wordpress even though I am inside the app.