COEN 278 - Advanced Web Programming - Santa Clara University
- Code: COEN 278
- Term: 2019 Spring
- Instructor: Yuan Wang
- Textbook: Agile Web Development with Rails 6
- Prerequisite:
- 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.
A docker image for Ruby CGI server.
-
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
/usr/bin/env: 'ruby\r': No such file or directory
: change EOF from CRLF(\r\n) to LF(\n)
- Ruby application server comparison: https://ruby-china.org/topics/25276