5 ms·
Yes, but how does your http server deliver the imported code to the front-end? Are you using some type of streaming bundler that does real time builds? Somethin
by root_axis 3mo ago
Yes, but how does your http server deliver the imported code to the front-end? Are you using some type of streaming bundler that does real time builds? Something isn't making sense here.
- austin-cheney 3mo agoOn application startup I assemble together the various front end files I need and store this in memory as a string. When the server sees a request for the desired page I respond with the desired string. Since I am not handcuffed by some giant framework I have maximum flexibility to do what makes sense.
- root_axis 3mo ago> On application startup I assemble together the various front end files I need and store this in memory as a string. So in other words, you created your own bundler? Node isn't actually doing the work for you on the front-end.
- austin-cheney 3mo agoAgain, I never said Node is did anything for the front end.
- root_axis 3mo agoAgain, yes you explicitly did: > I just write my code and then point node at the main file, and this even includes front-end code for the browser. It sounds like you're just making stuff up.
- austin-cheney 3mo agoIf you hire me as a consultant I will do it for you at $150 per hour.
- root_axis 3mo agoYou said: > I just write my code and then point node at the main file, and this even includes front-end code for the browser. Then you said: > I never said Node is did anything for the front end. So which is it?
- austin-cheney 3mo agoSince you need just a little help… Yes, I push all my TS code through Node for type stripping. No, Node is not executing browser code. No, I am not suggesting Node is running in the browser. For extra extra extra clarity importing functions in JavaScript does not execute them. They still have to be called for them to execute. I am still willing to fix your code for a consultation fee.
- brazukadev 3mo agoyeah this is a bit confusing. so you strip the types from the frontend and serve the .ts file as .js file? That's a transpiler/bundler.
- austin-cheney 3mo agoConfusing or not it works for me. No compile step and no build step. The application starts up in 0.2 seconds on Linux and about 1.2 seconds on Windows.
- brazukadev 3mo agoit is confusing the way you are explaining it, so much that even you can't understand. You do have a build step, you just think that doing that using node script is the same as not having one, I guess.
- root_axis 3mo agoYeah, IMO they are just making stuff up. Even as explained what they're saying makes no sense. Ultimately, there needs to be some entrypoint into the client-side script, node has no built in way to serve source code it's type-stripped over http.