1

nodejs configuration to serve vuejs/react whatever website local on brightsign player

i'm trying to get a modern website (vuejs) up and running on a brighsgn player.

if I call the url on an external server, it works wonderfully.

when i call up the local project on a windows pc, the structure looks like this:

folder: nodemodule
folder: site
index.js
package.json


a simple express server is integrated within the index.js file

const express = require('express');
const path = require('path');

const hostname = 'localhost';
const port = 3000;

const app = express();
app.use(express.static(path.join(__dirname, 'site')));

app.get('*', (req, res) => {
  res.sendFile(__dirname, '/site/index.html');
});

app.listen(port, hostname, () => {
  console.log("Listening at http://%s:%s/", hostname, port);
});

ok, then the file is called with node index.js and i can call the page on localport:3000.

how can I implement this with node.js on the brightsign? I've read everything I can about it, but I don't understand how it should be configured

5 comments

  • 0
    Avatar
    Alex

    Hey did you ever find a solution? Doing something similar

  • 0
    Avatar
    D Gapp

    I found this demo project https://github.com/brightsign/node.js-starter-project

    I used the BA Connect to select the main.js server file an the site.zip-

  • 0
    Avatar
    Alex

    Hey, can you add a little bit more detail to how you built and deployed your project? I've followed similar steps but would love some more info.

  • 0
    Avatar
    D Gapp

    1. make an server:

    https://betterprogramming.pub/build-an-app-with-live-reloading-using-express-and-webpack-787ea00c8eb4

    then you can link this file in BA connedt and under files you can link your site as site.zip

    thats's it

     

  • 0
    Avatar
    ulysse

    Hey I'm really stuck on this too, I have a basic vue app with webpack and cannot display it with the node js starter project, did you managed to do it ?

Please sign in to leave a comment.