Dashboard Hero
  • Scope
  • Introduction
    • Meet and greet
    • Requirements(tech)
    • Requirements(user)
  • Setting up
    • Developing locally
    • Deploying
  • Basics
    • Scss
    • Javascript
    • Svelte framework
    • vs React vs Angular vs vue.js
    • Rollup(and rollup.config.js)
    • NPM(and package.json)
  • Project structure
    • Overview
    • Git version
    • Folder version
  • Architecture
    • DRY vs WET programming
    • Basic
    • Extended
  • Components
    • Component lifecycle
    • Passing data between components
    • Buttons
    • Charts
    • Grids
    • Search bars
    • Other inputs
    • Dialogs
    • Dropdowns
    • Gauges
    • User management pages
  • Backend
    • Firebase cloud functions
  • Data sources
    • Firebase
    • MongoDB
    • *SQL sources
    • GraphQL
  • User management
    • Log in
    • Register
    • Forgot pass
    • Custom flows
    • Others
  • State control
    • Redux
    • MobX
    • Saga
  • Dashboard: a full project
    • Overview
    • Layout
    • Routing
    • Removing/adding pages
    • Deploying
  • Roadmap/tutorial
    • Introduction - building your own app
    • 1. UI - HTML&CSS
    • 2. Data sources(+testing)
    • 3. Defining and using existing components
    • 4. User management
    • 5. Go live!
  • Troubleshooting
    • Can't run the project
Powered by GitBook
On this page

Was this helpful?

  1. Setting up

Deploying

PreviousDeveloping locallyNextScss

Last updated 5 years ago

Was this helpful?

There are various ways of deploying your app. We'll quickly look at each option - more details(custom domains, multiple environments) in the section of the Roadmap/Tutorial.

Vanilla version of the UI/admin

Sometimes, you want to first get the UI right before you start dividing it into components and injecting live data. Editing and exploring ideas works faster when you're only concerned with HTML and CSS.

You'll need to deploy the finished HTML mocks somewhere, so you can show it to your team members, partners and investors. We recommend you deploy to Heroku. Here's how to do it.

Clone the basic-admin repo, and navigate to the folder. Then run

npm run dev

You will notice a new folder appears, called /build. What happens is webpack translates your source files into something a browser can understand.

Open the /deploy folder. You'll notice it contains a /build folder, and a basic express app. This is what we'll use to do the actual deploy. First, create and install the heroku CLI toolblert. In the deploy folder, run heroku create

, then

git push heroku master

If successful, you should see something similar to this:

Running heroku open should show your dashboard, in all it's splendor.

Dashboard Hero version

In your terminal, navigate to your project folder.

npm install -g now
npm run build
cd public
now

Install surge if you haven't already:

npm install -g surge

Then, from within your project folder:

npm run build
surge public

Install the firebase CLI. Navigate to your /public folder and run

firebase init

Follow the on-screen instructions, and then run

firebase deploy

We'll look at how to deploy multiple app profiles(dev/staging/production) and at what's going on behind the scenes in the Architecture section.

Now
Surge
Firebase
Go live!
Heroku