Click here to Skip to main content
15,889,335 members
Articles / Web Development / HTML
Tip/Trick

Hitching a Ride on the huMONGOus Meteor, Part 2 of 9

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
6 Aug 2015CPOL2 min read 8.3K  
Part 2 of the 9-part series "As the Meteor Blazes" - making changes to the default HTML

You Gotta Have a Uniform to Fight Crime

Now, let's add some custom HTML to our Meteor app.

To do so, follow these steps:

First (if your Meteor app is not running yet), open a Command Prompt, and navigate to the folder where you created your Meteor app.

One you have navigated to your project's directory, enter "meteor run" and mash the <Enter> key.

Once your app is running, "point your browser" to http://localhost:3000

Now open Windows Explorer, and navigate to the folder where you created your app. It could be something like:

C:\Users\clayshan\Meteor\<yourProjectName>

In the folder that bears your project's name, you will find an .html file named <yourProjectName>.html

Open that html file in your preferred editor (Notepad or Notepad++ will work fine, but feel free to use fancier tools) and replace the existing html with something quick and easy like:

<head>
	<title>timeandspace</title>
</head>
<body>
	<h1>A List of the Places I Have Lived</h1>
</body>

IOW, just replace the body text and remove everything else but the head section, which automatically contains your project name. When you are ready to save your changes to the HTML file, you may have to do a "Save As" to get the changes to stick and, if you look at the command prompt, you might now see, "Client modified -- refreshing"

Now you should see the out-of-the-box html of your Meteor app change its appearance to correspond with the html you replaced it with.

What Am I Doing Up Here? I'm Scared of Heights!

Nice! You can now call yourself a Meteorite (that is to say, a denizen of virtual Meteorville).

However, you may want to spiffy up the appearance of that HTML with some CSS. To do so, open up the .CSS file, add some classes or such, and then do a "Save As" similar to what you did with the HTML file.

That's all for this exciting episode of "As the Meteor Blazes." Next, we will dip our toes into the MongoDB aspect of the Meteor framework. The first thing to do will be to create a "table" (called a Collection in Mongo-speak, but we'll cross that bridge when we ... you know). So next time we'll start in with the MongoDB (huMONGOus DataBase) side of the house.

 

All Articles in the Series "Hitching a Ride on the HuMONGOus Meteor" (or, "As the Meteor Blazes")

PART 1: Installing Meteor, creating a Meteor project, and running the out-of-the-box Meteor Javascript App

PART 2: Making changes to the default HTML

PART 3: Creating a MongoDB Collection

PART 4: Creating the HTML to Receive Input from the User

PART 5: Writing MongoDB data

PART 6: Reading MongoDB Data and Displaying it on the page

PART 7: Gussying up/spiffifying the page with HTML and CSS

PART 8: Filtering and Ordering MongoDB Result Sets

PART 9: Meatier Meteor and MongoDB for Mutating Mavens

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder Across Time & Space
United States United States
I am in the process of morphing from a software developer into a portrayer of Mark Twain. My monologue (or one-man play, entitled "The Adventures of Mark Twain: As Told By Himself" and set in 1896) features Twain giving an overview of his life up till then. The performance includes the relating of interesting experiences and humorous anecdotes from Twain's boyhood and youth, his time as a riverboat pilot, his wild and woolly adventures in the Territory of Nevada and California, and experiences as a writer and world traveler, including recollections of meetings with many of the famous and powerful of the 19th century - royalty, business magnates, fellow authors, as well as intimate glimpses into his home life (his parents, siblings, wife, and children).

Peripatetic and picaresque, I have lived in eight states; specifically, besides my native California (where I was born and where I now again reside) in chronological order: New York, Montana, Alaska, Oklahoma, Wisconsin, Idaho, and Missouri.

I am also a writer of both fiction (for which I use a nom de plume, "Blackbird Crow Raven", as a nod to my Native American heritage - I am "½ Cowboy, ½ Indian") and nonfiction, including a two-volume social and cultural history of the U.S. which covers important events from 1620-2006: http://www.lulu.com/spotlight/blackbirdcraven

Comments and Discussions

 
-- There are no messages in this forum --