Skip to content

Commit

Permalink
cow say cool
Browse files Browse the repository at this point in the history
  • Loading branch information
bhuber2010 committed Dec 8, 2015
1 parent fd1c2cb commit 4005682
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ var books = ["Javascript-The Good Parts", "Eloquent Javascript",
"Horton Hears a Who"];

app.get('/cowsay/:cowsays', function(request, response){
response.send(cowsay.say({'text': request.params.cowsays}));
response.setHeader('content-type','text/html');
response.send(
"<pre>" +
cowsay.say({'text': request.params.cowsays}) +
"</pre>"
);
})

app.get('/', function(request, response){
Expand Down

0 comments on commit 4005682

Please sign in to comment.