How to deploy an angularcli-meteor project on Galaxy? - angular-meteor

Using angularcli-meteor, how to deploy an angularcli-meteor application on Galaxy since the meteor project itself is inside the "api" folder?

I have the same question in mind for a ionic 3 application, your API folder is a meteor project so you can deploy it on galaxy. And then host your Angular app else where if you make sure that your DDP_DEFAULT_CONNECTION_URL points to this galaxy server.
You can set it DDP_DEFAULT_CONNECTION_URL in bundler.config.json don't forget to re-generate your meteor-cliend-bundle.js file (npm run meteor-client:bundle) before deployment.

Related

Laravel 9 replies "Vite manifest not found" on production server

When I deploy a Laravel 9 project to production, Laravel replies:
Spatie\LaravelIgnition\Exceptions\ViewException: Vite manifest not found at: /var/www/.../public/build/manifest.json in file /var/www/.../vendor/laravel/framework/src/Illuminate/Foundation/Vite.php on line 139
It turns out the files in /public/build folder are not committed in the git repository, thus missing on production server.
Should I?
Install npm on production server and run npm run build to generate the manifest files, or
Include the manifest files (e.g. manifest.json) of /public/build folder into my repository and pull them in production server ...
You can add buildpacks (scripts that are run when your app is deployed. They are used to install dependencies for your app and configure your environment) on Heroku which will allow you to run npm. Well, easy does it on Heroku.
But if you happen to be on Fortrabbit, where you can't run npm or vite in ssh. The simplest way is to build your assets locally (npm run build or vite build) and push them to production.
Make sure you comment the public/build folder in .gitignore before pushing it to production. This might work for a lot (almost) of servers including Heroku without adding buildpacks.
Should this fail, make sure your APP_ENV is set to production APP_ENV=production or anything else except local as the documentation of vite states.

heroku: Deploying angular app inside spring boot app

I've one repo sunixi and it has two projects sun-angular(angular) and sun-admin(spring boot) in ts-admin i'm building ts-angular via executions and moving dist into resources/static of sun-admin project after that i'm building the sun-admin. On local enviroment it is working fine but how can i do same in heroku deployment.
structure of repo
sunixi
---sun-angular
---sun-admin
in sun-admin i'm setting workingDirectory as ../sun-angular but while deploying to heroku i'm getting
Cannot run program "npm" (in directory "/tmp/build_02607c07/sun-angular"): error=2, No such file or directory
If you are using a monorepository strategy, an option is to use subdir buildpack to select where is the path of your folder: https://github.com/timanovsky/subdir-heroku-buildpack
If you want to deploy backend and frontend in the same heroku app, the project folder should contains a npm package. Otherwise, i will not work.

How to deploy and run clojurescript application in Heroku

I have a template of a clojurescript application from https://github.com/Day8/re-frame-template. So I want to deploy that template without any modifications to Heroku. So I followed the instructions on the README
lein clean lein cljsbuild once min. Then I follow the instructions on Heroku as well on deploying clojure on https://devcenter.heroku.com/categories/clojure-support
But when I check if the application runs all I get is an application error.
So my questions are:
How does one build and deploy a clojurescript app to heroku?
What is the difference in deploying a clojurescript app vs a clojure app
Do I need a clojure server in order to run clojurescript?
How does one even run a standalone clojurescript app on the desktop?
How is the generated app.js related to running a clojurescript app?
I have found it pretty easy to deploy and run a clojure app on Heroku as well as a standalone applicaton on my desktop, I was hoping the same would be true for clojurescript.
Edited:
The error is here: https://floating-depths-33030.herokuapp.com/
To clear the topic for future people finding heroku + clj/cljs, following is a list of working examples. The clojure support on heroku means you can have Clojure webapp deployed. But cljs (like re-frame) actually is pure javascript, have nothing to do with heroku clojure support.
https://github.com/kawasima/back-channeling
https://github.com/zerg000000/table-tmpl
To deploy a re-frame application to Heroku one needs a clojure server, this is where ring comes in. In order to add ring one needs to add +handler while creating a new re-frame project as so:
lein new re-frame <project-name> +handler
This will create a project with a configuration that allows it to be deployable to Heroku.
Steps to deploy to Heroku:
lein clean
lein with-profile prod uberjar
git init
git add .
git commit -m "first commit"
git push heroku master
heroku ps:scale web=1
heroku open
This is application is now readily accessible.

jhipster : angularjs files and browser cache

I am developping a Jhipster web app.
My problem is that when I update some angularjs files and then deploy the new war file in Tomcat7 the modifications are not taken into account, the clients pc is still reading the old angularjs file.
Is there a way(or a jhipster configuration) to tell the client pc to reload all angularjs file in order to be up to date?
Thanks you.
When you build your app with prod profile using mvn -Pprod package or gradlew -Pprod bootRepackage the web assets are minified and prefixed with a unique code in dist folder. An older version of same file has a different prefix so if it is cached it will not prevent the new one from being loaded.
If you don't see this behavior, it's probably because you didn't set the spring.profiles.active property to prod in Tomcat and so your app is running in dev mode and not using the files from dist.
If your frontend and backend are in the same war: 0.0.1-SNAPSHOT change this version in pom.xml before making a build to avoid angular caching issues.
If your frontend is split then go to: gulp/utils.js and change this version: '0.0.5-SNAPSHOT';

Play framework file hierarchy on Heroku

I'm trying to download a file from my app, when I'm running on localhost everything is fine and in using this path in order to download the file
../myapp/public/files/67784.pdf
But on Heroku I'm getting java.io.FileNotFoundException. How can I find location of the file on Heroku?
Thanks!
Public assets in Play are packaged in the Jar on compilation (makes it very convenient for moving everything around, and get them from a plugin or whatever). So you have to get them from you app Jar.
I think that you can use the Play's resource helper (http://www.playframework.com/documentation/2.2-SNAPSHOT/api/java/play/Application.html), but I haven't tried.
Play.Application.resource("public/filename")
Note that on Heroku, any file modification/addition on the server is lost whenever you redeploy, or restart or add an instance... The only files that persist are the ones in your Git repo.

Resources