Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build a website on Node.js?

I've just started diving into Node.js after several years of PHP programming and I would like to build a Node.js app for my next project, but I have no clue how to do it.

Are there any resources for a Node.js jumpstart?

Thanks in advance!

like image 765
drelkata Avatar asked Jan 01 '12 20:01

drelkata


People also ask

Can you build a website using node JS?

To build a Website in Node. js we will use Express. js framework. Any other framework can also be used but Express.

Is Node JS good for website?

Using Node. js for web app development is one of the best options for large organisations as it's fast and scalable. As it runs on the V8 engine it is very fast in terms of computing speed which can in turn increase traffic on the web and mobile portals.

How do I create a new page in node JS?

nom; var newPage = new Page(nom); res. redirect('http://myDomain/' + nom); });


2 Answers

You should think of Node.js as some kind of Apache + PHP, meaning that you can program your website and your webserver with Node.

Node has some important differences with your basic PHP, it's evented, asynchronous, non-blocking. You have to learn how to deal with callbacks, don't block the event loop and other things.

What you should do is try to learn the basic stuff with Node at the beginning, here are some great resources: https://stackoverflow.com/tags/node.js/info (my favorite has been nodetuts.com and the excellent book by it's author, Hands on Node).

After you've learned the basics, you can find Express really useful as a web framework and Socket.IO if your app is focused on real-time.

like image 163
alessioalex Avatar answered Sep 22 '22 20:09

alessioalex


I think you're searching for a node.js jump start to build some meaningful web page with node. Take a look at express, which is a node web framework. They offer a nice but short tutorial (under guide).

like image 25
saintedlama Avatar answered Sep 20 '22 20:09

saintedlama