Skip to content
COEN 278 Advanced Web Programming, 2019 Spring, Santa Clara University
Branch: master
Clone or download
Amblizer
Latest commit 23d08a0 Jun 9, 2019

README.md

COEN 278 Advanced Web Programming

Browse Website

Build Status

COEN 278 - Advanced Web Programming - Santa Clara University

Information

Syllabus

  1. High level structure
    • Web application development overall
    • Server side programming using Ruby to create web related applications for example, we will use Ruby to write web server
    • Using frameworks to create web applications We will be using two: Sinatra, Ruby on Rails
    • Other issues (i.e. security)
    • Other languages and frameworks.

Docker Ruby CGI server image

A docker image for Ruby CGI server.

Sinatra

  1. Initiate container and mount the current directory

    docker run -it -p 80:80 -v ${pwd}:/pwd -w /pwd ruby
  2. Run sinatra on 0.0.0.0:80

    # w/  shebang
    [name].rb -o 0.0.0.0 -p 80
    
    # w/o shabang
    ruby [name].rb -o 0.0.0.0 -p 80

Debug

  1. /usr/bin/env: 'ruby\r': No such file or directory: change EOF from CRLF(\r\n) to LF(\n)

Todo

  1. Ruby application server comparison: https://ruby-china.org/topics/25276
You can’t perform that action at this time.