feat: implement command for running the application on systems without electron or GUI#3
Draft
inga-lovinde wants to merge 1 commit intomongodb-js:mainfrom
Draft
Conversation
…t electron or GUI
2a438cb to
24e9183
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm not sure how exactly is this project supposed to be used, and how it is used internally in MongoDB.
But I received a link for it as a sample project for the pair programming interview; the interview description seems to assume that it is only used as a sample react project, and that it will only check the frontend knowledge, so presumably Electron knowledge is not going to be needed. And tests do not use electron in any way either.
It seems that, at least in this sample project (again, I have no idea how it's actually used internally), Electron is only used as an unnecessary tool to render a static
index.htmlpage inside Electron window. But I already have a tool for that on my desktop; it's called "web browser", and it does not require me to have my dev environment with all the node dependencies on the same system.Running
npm starton my dev environment predictably results in a bunch of errors like(and even if it wouldn't... there is literally no way it would be able to display me an electron window on a system I just ssh'd into.)
So I added a new low-effort npm command that builds an application and serves it as a static react application over HTTP. It works flawlessly in my browser; at least I can click on "Add one" button and see the "count" go up.
Marking this as a draft because I don't know whether this sample project is only used for interviews, or also as a template for actual electron applications. (If it's the latter, then
npm run start-no-electronprobably doesn't belong here; but also then probably it's a good idea to have a separate sample project for interviews, without unnecessarily forcing people to set up an electron dev environment for that.)