Simple example of how to structure a monolithic Vue application
A simple example of how to structure a monolithic Vue application, with the frontend and backend both living within the same codebase.
NOTE: This project relies on Yarn as an alternative to NPM. To install Yarn, follow these instructions.
To start your development server:
Once it's started, you'll see a local URL you can use to access it (by default,
http://localhost:8080if it's available). Note that all routes starting with
/api/are automatically proxied to your backend server.
Only the first time, to create your app:
Push the Git branch you want to deploy to Heroku:
git push heroku branch-to-deploy:master
During your build process, make sure to:
Install dependencies, using the exact versions in your lockfile
yarn install --frozen-lockfile
Build the frontend
Then start your application with:
By default, it will be available at
http://localhost:9090, but the port can be configured with a