Configuración básica del proyecto
1. La aplicación tiene que tener un backend. Si solo tiene un index.html, se tiene que agregar un index.php que contenga:
2. Inicializar repositorio con Git y hacer el primer commit.
Configuración del hosting
1. Crear cuenta de Heroku.com y crear una nueva aplicación (app).
2. Especificar el build pack de php en https://dashboard.heroku.com/apps/[nombre_de_la_app]/settings.
Conexión del sistema con Heroku y deploy
1. Crear llave ssh e indicar la llave pública en Heroku.
2. Descargar e instalar el Heroku Toolbelt para Windows.
3. Ejecutar comando en cmd y especificar el e-mail y la contraseña de Heroku:
Posibles errores
El historial de errores revisarlo en https://dashboard.heroku.com/apps/[app_name]/activity
<?php include_once("index.html"); ?>
Referencia | 12. Inicializar repositorio con Git y hacer el primer commit.
Configuración del hosting
1. Crear cuenta de Heroku.com y crear una nueva aplicación (app).
2. Especificar el build pack de php en https://dashboard.heroku.com/apps/[nombre_de_la_app]/settings.
Conexión del sistema con Heroku y deploy
1. Crear llave ssh e indicar la llave pública en Heroku.
2. Descargar e instalar el Heroku Toolbelt para Windows.
3. Ejecutar comando en cmd y especificar el e-mail y la contraseña de Heroku:
heroku login
4. Añadir remote de la app de Heroku al proyecto:heroku git:remote -a [nombre_de_la_app]
5. Deploy:git push heroku master
Resultado:
Counting objects: 277, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (198/198), done.
Writing objects: 100% (277/277), 2.90 MiB | 15.00 KiB/s, done.
Total 277 (delta 136), reused 150 (delta 72)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> PHP app detected
remote:
remote: ! WARNING: No 'composer.json' found.
remote: Using 'index.php' to declare app type as PHP is considered legacy
remote: functionality and may lead to unexpected behavior.
remote:
remote: -----> Bootstrapping...
remote: -----> Installing platform packages...
remote: NOTICE: No runtime required in composer.lock; using PHP ^5.5.17
remote: - apache (2.4.20)
remote: - nginx (1.8.1)
remote: - php (5.6.24)
remote: -----> Installing dependencies...
remote: Composer version 1.1.3 2016-06-26 15:42:08
remote: -----> Preparing runtime environment...
remote: NOTICE: No Procfile, using 'web: vendor/bin/heroku-php-apache2'.
remote: -----> Checking for additional extensions to install...
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 16.5M
remote: -----> Launching...
remote: Released v3
remote: https://[app_name].herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/[app_name].git
* [new branch] master -> master
Posibles errores
El historial de errores revisarlo en https://dashboard.heroku.com/apps/[app_name]/activity
1)
! No default language could be detected for this app.
HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
See https://devcenter.heroku.com/articles/buildpacks
! Push failed
Motivo: no se agregó el build pack de php.2)
-----> Failed to detect set buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/php.tgz
More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
! Push failed
Motivo: no encontró index.php en el proyecto.
Referencia
http://erictsang.co/deploying-your-angular-app-to-heroku
3)
Consola del navegador:
Possibly unhandled rejection
Solución: injectar $qProvider y establecer $qProvider.errorOnUnhandledRejections(false)
Referencias:
https://github.com/angular-ui/ui-router/issues/2889
https://docs.angularjs.org/api/ng/provider/$qProvider
0 comentarios:
Publicar un comentario