question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I build and deploy webviz-core on my own server?

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
janpaul123commented, Jan 1, 2020

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.

0reactions
ubicraycommented, Mar 26, 2020

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found