 
     # Recent entries
     @app.get '/recents', (req, res) =>
+      numRecents = @config.numRecents ? @recentInfo.recentFiles.length
       markdown = """
       ## Recent Entries
 
       """
-      for file in @recentInfo.recentFiles
+      for file in @recentInfo.recentFiles[...numRecents]
         entryUrl = "/#{file.year}/#{file.month}/#{file.datepart}/#{file.slug}"
         ymd = @formatDate file.year, file.month, file.date
         markdown += "#{ymd} [#{file.title or '(untitled)'}](#{entryUrl})\n"

    elapsedTime = new Date().getTime() - startTime
    @logMessage "done (#{elapsedTime} ms)", noTime:true

module.exports = BitterServer

if not module.parent?

      err = @loadConfig()
      if not err?
        @logMessage "loaded #{path.basename @configFilename}"
        @createIndex()

    # Load page template and watch it for change
    @pageTemplate = fs.readFileSync @pageTemplateFilename, {encoding:'utf8'}
