Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![naquanhayes](https://secure.gravatar.com/avatar/919af3816ab661aaec53af0e80e0712d?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
naquanhayes
10,614 Pointscan i get some help or do i just leave this platform? i haven’t had an instructor able to help at all
where do people get help from? other students? I have to look to other students to get help? i can’t get help in a learning platform? i don’t understand? outdated information, and i’m supposed to know it’s not working and outdated, and i should find a solution, even though i’m learning all of this. this is completely ridiculous.
function root(request, response) {
if(request.url == "/") {
response.writeHead(200, {'Content-type': "text/plain"});
response.end("Home\n");
}
}
function contact(request, response) {
if(request.url == "/contact") {
response.writeHead(200, {'Content-type': "text/plain"});
response.end("Contact\n");
}
}
// Import any necessary modules if required
function about(request, response) {
if (request.url == "/about") {
response.writeHead(200, { 'Content-type': "text/plain" });
response.end("About\n");
}
}
module.exports = {
about: about,
// You can add other route functions here if needed
};
module.exports.root = root;
module.exports.contact = contact;
var http = require("http");
var routes = require("./routes.js");
http.createServer(function(request, response) {
if (request.url === "/") {
routes.root(request, response);
} else if (request.url === "/contact") {
routes.contact(request, response);
} else if (request.url === "/about") {
routes.about(request, response); // Handle the /about route
} else {
response.writeHead(404, { 'Content-Type': 'text/plain' });
response.end("404 Not Found\n");
}
}).listen(3000);
1 Answer
![Rich Donnellan](https://secure.gravatar.com/avatar/7710b15be09365c14d0805863ac55114?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Rich Donnellan
Treehouse Moderator 27,696 PointsTry starting with JavaScript Basics. Spamming the Community with posts of frustration helps no one.
naquanhayes
10,614 Pointsnaquanhayes
10,614 PointsStart the course over. Great advice.