Someone told me that npm run build
builds the application for production,
i.e. for being deployed in a place where your customers will use it.
I heard that it is even possible to deploy such app on Heroku! :-)
However, deployment on Heroku may be a bit tricky, because our app needs to have two environments now.
But we should be able to succeed :-)
Try executing npm run build
locally. What happens?
If you don't have the composer.json
file in the project, create
it with {}
content to meet PHP's requirements.
If you don't have the Procfile
file in the project, create
it with the following contents to tell web server to serve
files from the dist
directory.
web: vendor/bin/heroku-php-apache2 dist/
Commit both new files (if any).
Go to your apps on Heroku
Add an application with a name meetings-vue-YOURLASTNAME
and connect it to your Github's
repository.
In the console, use the heroku
CLI tool to configure buildpacks (i.e.
run configurations) for you app. You may need to install
heroku-cli
if you use your own computer.
heroku buildpacks:add heroku/php -a YOUR_APP_NAME
heroku buildpacks:add heroku/nodejs -a YOUR_APP_NAME
Deploy the app.
And see mine instance :-)