How do I build and deploy webviz-core on my own server?
See original GitHub issueI’m trying to build webviz-core so that I can host it on my own web server, where it will be served out of a different path. Here’s what I do inside a Docker container:
npm run bootstrap
npx lerna run build
npx webpack --env.NODE_ENV=production --config /webpack.config.js
These commands are based on the repository README and what the package.json build
script does.
My /webpack.config.js
file overrides the project’s in a few ways:
var config = require("/webviz/webpack.config")
// only build the Webviz core bundle
const entry_target = "webvizCoreBundle"
const entry = config.entry[entry_target]
config.entry = {
entry_target: entry
}
// override the path on the server
config.output.publicPath = "/static/webviz/"
// re-export the modified config
module.exports = config
I take all of the produced files in ./webviz/docs/public/dist/
and copy them to my static files directory.
However, when I navigate to this page in Chrome, I see a lot of noise that it is trying to connect to a local websocket port, and then when I drop a rosbag on it, it tries to load files from /dist/
, which isn’t the path I configured:
GET http://localhost/dist/f923f2a26c562dd21f5b.worker.js 404 (Not Found)
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Deploying on your own server - Packt Hub
The most common way to deploy any web app is to run it on a server that you have control over. Control in...
Read more >Host and deploy ASP.NET Core | Microsoft Learn
In general, to deploy an ASP.NET Core app to a hosting environment: Deploy the published app to a folder on the hosting server....
Read more >How to Deploy a Website LIVE on a Server with FREE Domain ...
Copy link. Info. Shopping. Tap to unmute. If playback doesn't begin shortly, try restarting your device. Your browser can't play this video.
Read more >Set Up Your Very Own Web Server! : 12 Steps - Instructables
1. This step may be easy for some and hard for others. I already had a PC that I wasn't really using (it...
Read more >Express Tutorial Part 7: Deploying to production
Up to now, you've been working in a development environment, using Express/Node as a web server to share your site to the local...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That said, I’ll also think more about releasing it as an npm package, even with a limited API, just to make it easier to integrate. It shouldn’t be too difficult.
@rgov I’m trying the same but it’s not working for me overall webpack builds it but doesn’t serve it. and I don’t get to see anything in the static folder afterwards either