Django REST + Vue3 deployment with Passenger - django-rest-framework

I have a local app with a Django backend and Vue3 frontend, and I have to deploy it to a Dreamhost Shared Host. I've already deployed the backend with Django and Passenger and it's working (the admin panel and its API is working), but now I need to add the frontend side to the server.
I've followed the instructions to deploy a Vue app, generating the dist folder with npm run build and then adding it to my public folder in the server, but nothing happens. I can't find any tutorial or anyone trying to build something similar, so any help to understand what I should have to do is welcomed.

Related

How can I make chnages to a MERN app after deploying it to Heroku?

I have created a MERN app and deployed it to Heroku. I now want to add some new features to my project. So, I added some new routes (/search) in the backend routes folder. But every time, I try the new route I get a 404 error. My NODE_ENV in the .env file and in my system is set to development. I have also added a proxy in the react package.json. Not sure what else I can do here. Any help will be appreciated.
routes file
backend package.json
REACT package.json

Connect Laravel pretty url and nuxt js

I satarted a project based on a Laravel-Nuxt Starter kit, found it here : https://bestofphp.com/repo/cretueusebiu-laravel-nuxt-php-starter-projects
I connected it to Laragon, so I can have pretty urls and making it work on Apache and MySQL. It works nocely, and when I do npm run start, I can access the website locally on localhost:3000 and it updates. However, if I use the pretty url given by Laragon, example.home, it goes to the index.html in the public server, but it doesn't update, no matter what I do. I tried npm run build, but the public folder isnt updated, the changes I do in the Vue component are only visible in localhost:3000.
What can I do to update the public folder according to the changes I do ?
Thank you !

How do I deploy Vuejs App backed by Laravel, In similar fashion we usually deploy laravel app or I need seperate frontend and backend instances?

Hello guys I have been deploying Laravel applications on the server for a while, I have just created a SPA(Single Page App) Laravel + Vuejs how do I deploy it ? Just like normal laravel app or I need separate Frontend(Vuejs) and Backend (Laravel) instances ?
It is same as regular laravel app deployment.
run npm run production and after that make whole project as zip and put it on serve and just follow the steps as regular laravel project.

how integrate an existing vuejs app created with vue-cli into a laravel project

I've a vuejs app builded with the latest vue-cli, the vuejs app runs ok with the development server and communicates with the laravel app, but now I'd prefer that laravel handle this static files...if I build the js files with yarn run build this generates me several files, I could add thems to my laravel homepage but I'm afraid that if in the future I make some change and build these files again, I could get different file names...
what is the best approach for this???...I've found several articles integrating vuejs and laravel but all these are using the vuejs tool incorporated with laravel
thanks so much guys

Deploy ember-cli and rails api

I'm looking for a way to deploy on Heroku a Rails API and an ember-cli application. My directories structure is something like that:
application
frontend
rails-api
Can someone help me? I'm really new Heroku user.
PS: I don't want to use gems like 'ember-cli-rails'
I would deploy them separately, and keep them in separate git repos.
Ember
Use ember-cli-deploy. I would suggest you look into the ember-cli-deploy-lightning-pack. There is a presentation about it here.
This automates the release process -
Builds your Ember app, with asset fingerprints
gzips the assets
Uploads changed files to AWS S3
Puts the full content of your index.html into Redis
Rails
deploy your rails-api app to heroku normally
include a redis addon
set up the route which serves index.html to query it directly from Redis instead
I would suggest aliasing all non-api routes (ie a catchall route) to the root route so you can 'deep link' to your ember app
A big advantage of this process is that you can deploy changes to your frontend very quickly, and without having to take down or restart the server.

Resources