Giter Site home page Giter Site logo

learn-chef / habitat-building-with-scaffolding Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 205.0 1 MB

A web application that is ready to be packaged with Habitat scaffolding.

Home Page: https://learn.chef.io/modules/hab-build-web-app#/

Ruby 88.70% HTML 11.30%
habitat ruby sinatra imagemagick rmagick rackup

habitat-building-with-scaffolding's Introduction

meme-machine

"Make a Learn Chef Meme in this web application.

Build

> This is a Ruby application so it is not built. Ideally, you would run some tests. But this project does not have any yet.

Deploy

> The assumption is that you have git, Ruby, and ImageMagick installed on the system.

1. Clone this repository
2. Install ImageMagick
3. Run `bundle install`

Run

$ rackup

About

When you run the application through the command rackup, the rackup command will look for and load the config.ru in the current working directory. This file is the Rackup (The 'ru' stands for Rackup) configuration file.

The Rackup configuration file loads the file that contains the website application and then launches this classic style Sinatra application.

The default port that Rackup will launch the application is 9292. When you visit that site you will be executing the code defined in the lib/service.rb. The default index page routes to the block of code defined for get '/'. It will render the index template found in lib/views. This will render a simple form that will request an image.

When you select an image and press 'Upload image', you will be routed to the block of code defined for post 'packaged'. This will find the images provided by you and then pass that image to the method (defined in lib/meme.rb) that creates the animation. That animated image is then saved to the websites public directory (a temporary directory) and then served up by the habitatized template found in lib/views

habitat-building-with-scaffolding's People

Contributors

drrk avatar stellarsquall avatar stevendanna avatar therandyspencer avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.