This is a summary of the basics of Ruby on Rails.
Start the terminal.
$rails new application name
By executing the above command, a folder with the same name as the entered application name will be created, and the folders and files required for development will be prepared in it.
Application name/
├ app/Application main folder
├ config/Folder for setting information
├ db/Database related folders
└:Other
Enter in terminal
$ rails server
Open localhost on port 3000 in a browser such as Google Chrome or Safari.
localhost:3000
Ruby on Rails has started successfully.
This time, it came out as port 3000, but the word port number is indispensable for knowledge related to infrastructure.
Internet terminology 1 minute explanation-What is a port number --- JPNIC explains as follows. I will.
The port number is a number that identifies the program that the computer uses for communication in TCP / IP communication. The port number is a 16-bit integer, ranging from 0 to 65535.
At a deeper level, there are roughly three types of port numbers.
It is classified as above.
By the way, this time, port 3000 is used by default for Ruby on Rails, and port 8000 is used for Django, but since these 3000 and 8000 correspond to registered port numbers (1024 to 49151). , IANA is now accepting registrations and publishing them.
Abbreviation for Internet Assigned Numbers Authority. It is a function to manage Internet resources such as domain name, IP address and AS number, protocol name and number used in each protocol. IANA was founded in 1988 by the late Jonathan Bruce Postel of the Information Sciences Institute (ISI) at the University of Southern California. IANA is one of the oldest institutions on the Internet, and its activities can be traced back to the 1970s. After that, ICANN was established in October 1998, and the role of IANA's global management and coordination of various resources was taken over as a part of ICANN. For that reason, it is used to represent the function of managing Internet resources, including historical ones. Quote: JPRS Glossary | IANA
TCP / IP communication and HTTP can be deepened further, so I will write an article if I have a chance.
Recommended Posts