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!
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

amadeo brands
15,375 PointsCompleted my first Node JS application ... but how can I run it on my website and share it with the world :D
I have completed my first Node JS application ... but how can I run it on my server? See here the URL where I placed my files: My application
See here my app.js file ... How can I get this to work on my website?
var router = require("./router.js");
const http = require('http');
http.createServer(function (request, response) {
router.home(request, response);
router.user(request, response);
}).listen(8080);
console.log('Server running at http://<workspace-url>/');
Thank you all :)
2 Answers

Matt F.
9,518 PointsHi Amadeo,
Are you hosting it on your own server, or are you paying a host? If a host, which one?

Matt F.
9,518 PointsHi Amadoo,
A lot of it will depend on the OS of your VPS. Here is a tutorial for Ubuntu:
amadeo brands
15,375 Pointsamadeo brands
15,375 PointsHi Matt, I host it on my own server its a VPS I use with multiple websites. Think I need to install some node.js but no idea where to start.