Running the Sample App

The sample code we’ll use in the book for our application is primarily HTML. I’ve given you two ways to load the HTML: a Rails app and a simple app built with React Create App.

To run the sample code, you need to download it from the book’s page on the Pragmatic Bookshelf website.[4]

For the Rails version, which is in the main directory, you need to have Ruby 3.0 and SQLite installed on your system. Running bin/setup in the sample code directory will load the Rails-specific parts, and then rails server will load the application itself—you should be able to access the site at http://localhost:3000. The samples are at http://localhost:3000/intro, http://localhost:3000/box, and http://localhost:3000/page.

For the React version, ...

Get Modern CSS with Tailwind now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.