Closed michaelb-01 closed 6 years ago
Maybe this illustrates it better? (i'm just showing the relevant folders)
app/ | --- api/ | |
---|---|---|
--- .meteor/ | ||
--- .desktop/ | ||
--- .index.html/ meteor desktop is loading this (which I don't want) | ||
--- src/ The src folder for my angular app | ||
--- index.html This is the correct index.html | ||
--- app/ | ||
--- .app.module.ts/ | ||
--- .app.component.ts/ | ||
--- node_modules | ||
--- package.json |
Hey, I just had a moment to look at this but what you are doing is an angular app, not an meteor app. You are using meteor server and bundling meteor client into angular app but technically it is still just an angular app. Therefore meteor-desktop will not work you in this project.
Of course I may be wrong with that. Are you running your project with meteor
command line or anyway else?
Yes in one terminal I start my meteor project with the following npm script:
"api": "cd api && MONGO_URL='mongodb://localhost:27017/meteor' meteor"
Then I in another terminal I start the angular app with:
"start": "webpack-dev-server --port=4200"
So it should work right? I was using Meteor desktop before but I had to slightly restructure my app, and now the meteor app project has ended up in a sub folder hence this issue I'm having
Have you had a chance to look at this? It's critical that I'm able to turn my project into a desktop app, so if it means I need to restructure the app so it works with Meteor desktop I can (try) and do that..
Sorry, till the end of the month I have very little time to spend on this project. You are using the meteor as a backend here and your main project is Angular based - I'm pretty sure of that since you are starting your angular app separately ->
"start": "webpack-dev-server --port=4200"
So you are not developing the frontend in meteor but directly in plain angular app. Meteor-desktop will not be able to take the angular app as it is copying the meteor client build only, it does not download the client, it only fetches index.html as the on-disk build does not have it. But everything else is copied from meteor build. I do not see any easy way of even supporting such a scenario.
I would recommend you implementing any well known electron-angular integration instead - it should work in your case. Unfortunately I can not recommend anything as I'm a React guy ;) and have very limited experience in Angular world.
Hopefully this is a simple fix and i'm being stupid..
I built my meteor (and angular) app with angular-cli, then I added my meteor project within an 'api' folder, then i'm using the meteor-client:bundle package to connect the two - basically the same setup as - https://angular-meteor.com/tutorials/whatsapp2/ionic/meteor-server-side
But it seems that meteor-desktop is trying to grab an index.html from the meteor project (in the 'api' folder), but my app is actually located up a level in /src. How can I tell meteor-desktop to look there?
/api contains .meteor and .desktop /api/index.html meteor desktop is loading this (which I don't want) /src contains my app with the correct index.html