Join Troy Miles for an in-depth discussion in this video Serving the example, part of Web Servers and APIs using C++.
- [Instructor] Let's run our web server…directly in the container.…From the build directory, type ./hello_crow.…The output looks promising.…Our server tells us it is using PORT 18080.…Let's try accessing it from the browser.…We enter localhost:18080 and press Enter.…Uh-oh.…
We can't access our site.…Why?…Each docker container is by default isolated.…None of its ports are open.…In order to access our server, we need to open a port…and tell the server which port to use.…We open a port by adding the -p option…to the docker run command.…The -p option opens a port and allows us…to map it to the host machine.…The first number is the host machine's port number.…The second number is the container's port number.…
The port numbers don't have to match.…The -e option allows us to create an environmental variable.…We'll use it to tell the server which port it is using.…So we go back to the terminal.…Control + C to stop that from running.…We can exit.…Then from here, we're gonna enter docker run -v…to create our volume, Users/troymiles/Desktop…
- Working with Crow, the C++ micro web framework
- Deploying containers to Heroku
- Building websites and webpages
- Accessing data from a database
- Accessing data via RESTful APIs
- Creating API endpoints
- Running WebSockets on Heroku
Skill Level Intermediate
1. Installing Our Tools
2. Deploying to Heroku
Installing the Heroku CLI1m 17s
3. Building Websites
4. Data Access
5. RESTful APIs
6. WebSockets and Crow
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.