segunda-feira, 29 de agosto de 2016

Testing your specific stacks solutions (NodeJS / Ruby / Python, Go, etc.) with Heroku

:: Some findings from this weekend ::
        Testing your specific stacks solutions with Heroku (NodeJS / Ruby / Python, Go, etc.)
              
Case you need to test something on the fly, some app that needs to have some specific server 
               / stack, you can use Heroku, for instance, right from GitHub.

              You just need to place this on the readme (or a simple link, https://heroku.com/deploy):


Like Docker Hub looks for a Dockerfile, also Heroku looks for a specific config file, app.json.

E.g., from the aforementioned tutorial (better, the fork I did  to my own GitHub account):

{
     
"name": "React Tutorial Server",
     
"description": "Code from the React tutorial",
     
"keywords": [ "react", "reactjs", "tutorial" ],
     
"repository": "https://github.com/fmbento/react-tutorial",
     
"logo": "https://facebook.github.io/react/img/logo.svg",
     
"website": "http://facebook.github.io/react/docs/tutorial.html",
     
"success_url": "/",
     
"env" : {
       
"BUILDPACK_URL": "https://github.com/heroku/heroku-buildpack-nodejs.git"
     
}
   
}

                Here the key is really the repository link and the BuildPack (in this case, we want to run it o
                Node.JS [and he knows that should be a server.js there, at the repository).

                At Heroku, you will be asked for an optional app name (must be unique in Heroku universe --
                else, leave it blank, it will randomly assign one), choose if you want it to run from US
                or 
Europe (AWS), click “Deploy for Free”, and you’re done.

                The example of this react tutorial, run at Heroku: https://react-gss.herokuapp.com/

                You have all sort of control and data over it, at the Dashboard:

                And yes, you can even fire an update in the App via Commits to GitHib:

Or even DropBox file changes from a sync'ed folder!


And that’s it, for now, hope you’ve enjoyed these series of 4 posts.

Enjoy!

.

Sem comentários:

Enviar um comentário