I am using z bar processor for barcode reading .I have used web worker to use path of zbar-processor.js.
var worker = new Worker('scripts/directives/zbar-processor.js');
The above code is working fine when running on localhost but gives 404 file not found when i deploy build using grunt clean build.
Related
As per my Title, I want to deploy Node.js & React.js projects in the same domain and server.
Basically, I want to host the application on cloudways server. https://www.cloudways.com/
I try to host there but due to the same domain action, it is not working as working in the local environment.
Front-end screenshot with package.json script structured(React.js): https://prnt.sc/xT4NAPxt0S99
Back-end screenshot(Node.js): https://prnt.sc/mSg_H4O6prF0
The given screenshot is from a local machine.
As you see here https://prnt.sc/xT4NAPxt0S99 we are using npm run build and after doing the build, we move that folder to the server folder and run npm i && nodemon index.js. It is working well in a single domain or IP in the local server well. But when I do the same process on a live server, it is not working.
Why I am using cloudways server?
For this, I don't need to install and set up MySQL, Node modules, PHP, and other things. Cloudways is doing all things when we create a cloud server.
npm i don't need to run this company on a server.
I've created a SvelteKit webapp that works great on my desktop in my local environment. I launch the browser/webserver with:
npm run dev -- --open
Now I've just deployed to Vercel. Everything works great, except the JavaScript command I use to launch my Web Worker gives a 404 error in the browser console:
new Worker('./lib/game/runs_thread.js')
Sure enough, if I copy /lib/game/runs_thread.js into my browser after my domain name, I get a 404 error. Where is my runs_thread.js and how can I launch my Worker?
I think what you need to do is replace
new Worker('./lib/game/runs_thread.js')
with
import workerURL from './lib/game/runs_thread.js?url';
//...
new Worker(workerURL)
Alternatively,
import MyWorker from "./path/to/worker.js?worker"
new MyWorker()
From vite's documentation
When following an article entitled, "Debugging React apps created with Create React App in WebStorm", the Debugger says it's connected to the JetBrains IDE Chrome Extension, but I can't get breakpoints to execute when using port 3000 and when I try to use the default debug port 63342 a 404 error is shown.
Here is a recording of my settings in Chrome and Webstorm 2016.2 IDE when trying to debug: http://recordit.co/MQ3LICuUIc
Steps Taken:
I've created a new JS debug configuration with the name 'ERS React Debug', the browser set to Chrome, and I've tried using the following URLs in the configuration:
http://localhost:3000/
http://localhost:3000/ers_react/public/index.html
http://localhost:63342/ers_react/public/index.html
(YT video I watched used the debug port, which is what is in my recording)
I also setup the mapping to webpack:///src as recommend in the article.
Default ReactJS app created with create-react-app is designed to be hosted on webpack server started with react-scripts start, that builds the application and starts the server. You won't be able to open this application on the simple built-in webserver (localhost:63342).
To be able to debug modern React app, you need upgrading Webstorm to the most recent version - debugging will work out of the box. Fot Webstorm 2016.2, you can try specifying URL mappings... For "react-scripts": "1.0.17", it should be http://localhost:3000/static/js/full/path to project, like http://localhost:3000/static/js/C:/WebstormProjects/untitled if the project path is C:/WebstormProjects/untitled should work:
Note that you would need to refresh the browser page to get breakpoints in code executed on pagfe loading hit
I have a REST Web Service running within Tomcat and I do not want to run the Node.js application manually. Can I somehow run my Node application using Tomcat?
You cannot run Nodejs server inside tomcat.
I would suggest to ge to http://nodejs.org/ and read some docs and refer some videos.
I have used openshift to host my node js application
please refer this link to know more about where to host nodejs application
I've created an application in Play an have deployed it to a linux server.
The app was developed on win7 and I ran 'dist' and copied the zip file over to the server.
I'm using DataTables (http://datatables.net/examples/styling/stripe.html) and TwitterBootstrap in the application but I can't seen any of this rendering in the app deployed to the server. I see it on my localmachine. Any idea why?