Why does AFrame require Node? - aframe

I've read a bit about AFrame, and I am very familiar with Node.js. But why does AFrame require Node to run? I tried looking at the index.html in the Aframe boilerplate sample--and it runs just the same in the browser with or without Node running. Is Node really required to be running? What is Node rendering?

Node.js is not required to run A-Frame — it runs in a browser with no expectation that your server use Node vs PHP, or that you use a webserver at all. Are you seeing something that makes it seem like Node would be needed?
However, the aframe-boilerplate starter kit does provide convenience features — used only during development — that rely on Node.js to automatically reload the page when your HTML changes, or deploy to GitHub Pages. These are not requirements for A-Frame itself, and can be ignored if you prefer.

Related

What's the difference between "next start" and "node server.js"?

So I'm struggling a bit with this. Let's say I build my NextJS project, I have 2 css files one of them is 10mb. Then I run next start and I see on Lighthouse that the file size is only a few kb. But if I run node server.js on the standalone folder, the css file size stays the same and that's a problem. Is this the intended behavior? Is there any way to fix this?
When I say standalone folder I mean this: https://nextjs.org/docs/advanced-features/output-file-tracing#automatically-copying-traced-files-experimental
UPDATED
I think you're trying to build custom server (https://nextjs.org/docs/advanced-features/custom-server)
According to that document, they mention this part which may be related to what you're looking for
Before deciding to use a custom server, please keep in mind that it
should only be used when the integrated router of Next.js can't meet
your app requirements. A custom server will remove important
performance optimizations, like serverless functions and Automatic
Static Optimization.
OLD ANSWER
next start usually goes along with next build (https://nextjs.org/docs/api-reference/cli#production) and it has its own custom configs under next.config with a ton of good stuff like file compression, routings, image optimization, etc. (under the hood, it also uses Webpack and Babel for builds)
node server.js is just simply to run a server and does nothing else. Therefore, if you want to have better builds like NextJS. You need to add libraries into NodeJS.
You can find some useful libraries here.
https://blog.bitsrc.io/23-insanely-useful-nodejs-libraries-you-should-know-in-2020-5a9b570d5416

Can Deno be used to bundle a Lit website?

I'm trying to create a simple proof-of-concept of using Deno to bundle a browser application which is using Lit. Basic functionality (e.g., initial component rendering) is functional, but I'm unable to get simple DOM manipulations to trigger the reactive property changes.
My simple example can be seen working at this Lit Playground example. An example which does not work is this Deno bundle version. These 2 versions have the exact same source code (i.e., index.html and main.ts).
You can view all of the code and the build process for creating the Deno bundle here.
Is Deno capable of producing bundles which behave in the expected manner?
Deno 1.17.2 is able to successfully create a bundle. See https://github.com/denoland/deno/issues/13048 for background. As #jsejcksn said, SWC is most likely the culprit for the original issue.
try https://github.com/mindon/packup which is using esbuild to bundle js for browser.
here's a demo with lit (with locales), material design web and three.js
https://github.com/mindon/deno.lit-and-mw3.demo

Vaadin + Css formatting

I'm using Vaadin 14.4.4 with Gradle 6.3 and Spring Boot.
When I was creating a website in developer's mode everything was working well. Now I switched to productionMode = true and website doesn't load a single css file.
I'm trying to use one css file per class.
After switching back to developer's mode the CSS formatting is not working as it used to.
I tried vaadinClean, vaadinBuildFrontend and vaadinPrepareFrontend but that doesn't seem to fix my problem...
Do you guys have any suggestions does any of you interfered with the same problem as I ?
From the docs of the gradle plugin for
Vaadin:
./gradlew clean build -Pvaadin.productionMode - will compile Vaadin
in production mode, then packages everything into the war/jar archive.
Automatically calls the vaadinPrepareFrontend and
vaadinBuildFrontend tasks.
Note the explicit passing of -Pvaadin.productionMode. It might seem
a bit counter intuitive to have to pass that explicitly to a task like
vaadinBuildFrontend, which sole purpose usually is to build the
production stage.

Meteor integration with node-ffi on client-side

Can I use Meteor with node-ffi (https://github.com/node-ffi/node-ffi) on client-side to allow users to load a native shared library on browser, making the browser capable of running the library and return the result to the server?
In practice: the user access the site from browser, click somewere, loads the library library path, them the library is executed and returns the result to server.
I'm pretty sure this won't work. The browser won't support what you are doing, as its a server wrapper, and will build an architecture specific wrapper to run the c++ code.

Spring boot hot deployment for templates and resources under IntelliJ

Is anyone aware of a mechanism to get hot deployment for resources and template working under IntelliJ 14.0.2 for a Spring Boot application.
I know that full Spring Boot support is scheduled for 14.1 but I have a project that I converted over from a standard WAR project to a Spring Boot project and I really miss the hot deployment.
At the moment I have to manually build the project that the resources are in to get hot deployment and even then it is a bit flaky sometimes. I would prefer to just save a template or a javascript/css file and get it picked up as I did when I was running my app using a local tomcat server via IntelliJ.
I could switch back to Eclipse to get this working, but my project is Scala based and IntelliJ Scala support is far superior.
So after some testing I came to few conclusions I think someone arriving here may find useful:
If you are running embedded spring boot application from IntelliJ IDEA (myself on 14 at the moment) in debug mode and you want to hot re-deploy resources you can do that via: Run -> Reload changed classes. Setting a keyboard shortcut much recommended.
Don't get fooled by Loaded classes are up to date. Nothing to reload. message. Your static resources have been updated (tested on .js files and Thymeleaf templates).
As pointed out in comments for thymeleaf templates hot-redeploy you would need:
spring.thymeleaf.cache=false
If you are running in external container IntelliJ provides extra features like action on Frame deactivation which is extremely handy for web development. This works fine as well just beware that external Jetty container on 9.2.7 will cause troubles, i.e. unload the resources on Update resources action breaking your webapp. The only fix was app restart for me. Works nicely in Tomcat 8 though.
As instructed here adding spring-boot-devtools dependency will enable static resources reloading (templates and css).
Beware that you need to select Build -> Compile for this to work.
Install jetbrains-ide-support
Start your Spring Boot app
Go in browser and open your_project_page(http://localhost:8080/)
right mouse click(on your page) -> choose "Inspect in IDEA"

Resources