I am trying to create an electronic application with a server component using express for remote control.
The express module is initialized with
var staticPath = path.resolve('app/assets') setupNotifications(server); app.use(cors()); app.use('/api/', json()); app.use('/api/', router); app.use('/assets', express.static(staticPath)); console.log('serving static files from : ' + staticPath);
Elecron docs mention that the current working directory cannot be installed in the folder in the asar archive. This is confirmed by the error message that the file is trying to read from "app / assets" under the installation root folder.
How can I express an expression to read files from an ASAR archive? And how can I do this so that I can develop with an βexplodedβ archive and deploy with a built-in archive?
source share