I would like to create an website with much realtime traffic. So my question is:
Is node.js and socket.io the right way?
(I'm ready to learn and have a good knowledge at PHP,JQUERY,JS,CSS,MYSQL and VB.NET)
I would like to create an website with much realtime traffic. So my question is:
Is node.js and socket.io the right way?
(I'm ready to learn and have a good knowledge at PHP,JQUERY,JS,CSS,MYSQL and VB.NET)
Node is a great language and if you like Javascript already, I believe it can be a great language to learn. The simplest way to get a simple web server up and running is Express (http://expressjs.com/). With express you can start a server and serve static content (your html pages).
Here is a quick guide to get started in Node.js
npm init
npm install --save express
'use strict';
const express = require('express');
const app = express();
const HTTP_PORT = 3000;
app.use(express.static('public'));
app.listen(HTTP_PORT);
console.log('Listening on port: ' + HTTP_PORT + ' -- Open http://localhost:' + HTTP_PORT);
node app.js
http://localhost:3000
Congratulations, you now have a real working node server, that serves static content and can handle ajax requests!
There is a ton of info I could put next, but I recommend checking out the express documentation to find how to handle routing and api requests.
Good luck and happy learning!
If you want a shortcut, I threw together a tiny starter pack of code that does all of the following and includes an API request example. https://github.com/DuaneGarber/nodeExpressStarter
Simply pull down the code, npm install
, then start the server node app.js
, open localhost:3000 in a browser.
If you have good or fair knowledge of javascript then you should go for Meteor.
Meteor
Sample tutorial you should start with