Giter VIP home page Giter VIP logo

bsa-computer-badge's Introduction

This is the skeleton for the Boy Scouts of America computer merit badge.  Boy Scouts should be able to complete either of the following exercises using this project:

- Use a general purpose programming language to write a simple program application of your choice, subject to approval by your counselor.

- Design a Web page for your troop, patrol, school, or place of worship. You need not post the page to a Web site. However, if you decide to do so, you will first need to get your parent's permission and your counselor's approval, as well as permission from the host site.

Under the project directory, you should find a file called "program.rb".  This is the main source file for the application.  In this file, you will declare the paths that you want the web application to respond to.  The root path ("/") has already been defined.  This is usually the "home page" path for a web site.  You can also create other paths by adding other paths this way:

get "/somewhere" do
  "Hi there!"
end

This will allow you to visit: http://localhost:9292/somewhere - You should see the words "Hi there!" in your web browser.

You can also add special pages to show HTML (HyperText Markup Language), which is the normal content of web pages on the internet.  These pages are the ones that you can make appear when your web browser visits any paths you have added to your "program.rb" file.  Beneath the "project" directory, you will find another directory called "views".  Inside that directory, there is already a file called "index.erb".  This is the special HTML page that is shown in the browser when you visit the "homepage" for this web application.  You can add other files with the ".erb" extension in this same directory for each path you add to "program.rb" (like the "/somewhere" path shown above -- for this you would create a file called "somewhere.erb" in the views directory and then add "erb :somewhere" just below where it says "Hi there!" in the above example).  Looking at the "program.rb" should provide an example of how to use special views files.

There is also a directory called "public" beneath the "project" directory.  Inside "public" is another directory called "images".  This is a directory where you can place images that you would like to display on your web application.  The "index.erb" file in the "views" directory has an example of how to add a picture to a web page.

On a Windows computer, you can double-click the "run.bat" file found in the project directory and the web server should start.  You can visit the home page by visiting this address: http://localhost:9292/

bsa-computer-badge's People

Contributors

marioaquino avatar

Stargazers

 avatar

Watchers

 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.