COEN 278 Advanced Web Programming
Browse Website
COEN 278 - Advanced Web Programming - Santa Clara University
Information
- Code: COEN 278
- Term: 2019 Spring
- Instructor: Yuan Wang
- Textbook: Agile Web Development with Rails 6
- Prerequisite:
Syllabus
- 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
-
Initiate container and mount the current directory
docker run -it -p 80:80 -v ${pwd}:/pwd -w /pwd ruby
-
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
-
/usr/bin/env: 'rubyr': No such file or directory: change EOF from CRLF(rn) to LF(n)
Todo
- Ruby application server comparison: https://ruby-china.org/topics/25276