const http = require('http'); const url = require('url'); const PORT = process.env.PORT || 3000; // Movie data const movieData = { title: "Star Trek: First Contact", year: 1996, tagline: "Resistance is futile", summary: "The Borg travel back in time to prevent Earth's first contact with an alien species. Captain Picard and his crew pursue them to ensure that Zefram Cochrane makes his maiden flight reaching warp speed.", characters: [ { name: "Captain Jean-Luc Picard", actor: "Patrick Stewart", role: "Captain of the USS Enterprise-E, haunted by his past assimilation by the Borg" }, { name: "Commander William Riker", actor: "Jonathan Frakes", role: "First Officer who leads the away team to help Zefram Cochrane" }, { name: "Lt. Commander Data", actor: "Brent Spiner", role: "Android who is captured and tempted by the Borg Queen" }, { name: "Borg Queen", actor: "Alice Krige", role: "Leader of the Borg Collective who attempts to seduce Data" }, { name: "Zefram Cochrane", actor: "James Cromwell", role: "Inventor of warp drive who makes first contact with the Vulcans" }, { name: "Lily Sloane", actor: "Alfre Woodard", role: "Cochrane's assistant who helps Picard confront his demons" } ] }; // HTML Templates function renderHTML(title, content) { return `
"${movieData.tagline}"
This application is dedicated to one of the most beloved Star Trek films. Explore information about the movie, its characters, and the historic moment when humanity made first contact with extraterrestrial intelligence.
The eighth film in the Star Trek film series and the second featuring the cast of The Next Generation.
This was Frakes' feature film directorial debut, also starring as Commander Riker.
Use the navigation menu above to explore:
${movieData.summary}
The date of humanity's first contact with alien life in the Star Trek timeline. After successfully testing the Phoenix, Earth's first warp-capable ship, Zefram Cochrane attracts the attention of a passing Vulcan survey ship, forever changing human history.
The Borg, a cybernetic collective consciousness, travel back in time to prevent this pivotal moment. Their goal: assimilate Earth before it can join the galactic community.
Played by: ${char.actor}
${char.role}
Meet the heroes and villains of Star Trek: First Contact
${characterCards} `); } function notFoundPage() { return renderHTML('404 Not Found', `The page you're looking for doesn't exist. Perhaps it was assimilated by the Borg?