From 2fddcdf5f491fee4280481ee963aa7290e1ac5d4 Mon Sep 17 00:00:00 2001 From: Amr Faisal Date: Fri, 11 Jan 2019 17:40:33 +0200 Subject: [PATCH] docs: Add Heroku platform guide --- docs/guide/deployment.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/guide/deployment.md b/docs/guide/deployment.md index 4b21524660..15e155fc1c 100644 --- a/docs/guide/deployment.md +++ b/docs/guide/deployment.md @@ -261,7 +261,16 @@ npm install -g now ### Heroku -> TODO | Open to contribution. +1. Follow this guide to install [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli). +2. Navigate to the root of your project, use this command `cd `. +3. Create a new `Git repository`, use this command `git init`. +4. Create a new `Heroku` app, use this command `heroku apps:create `. +5. Add [Serve](https://github.com/zeit/serve) as a dependency to your project, use this command `npm install serve --save` +6. Modify your project's `package.json` file, add these two lines to the `scripts` section: + * `"heroku-postbuild": "npm run build"` To tell `Heroku` to build your project in the `dist` folder. + * `"start": "serve -s dist"` To tell `Heroku` to use `Serve` to serve your project from the `dist` folder. +7. Commit your changes to git, use this command `git add . && git commit -a -m "Adding Heroku deployment support"`. +8. Deploy your app to `Heroku` by pushing your new updates, use this command `git push heroku master`. ### Surge