3

I've installed LAMP server with this command.

sudo apt-get install lamp-server^

Now I'm wishing to install Node.js.

Will it make any affect on my previous LAMP installation ?

1
  • No, not that I know.
    – mondjunge
    Aug 28, 2015 at 9:14

1 Answer 1

4

NodeJS shouldn't interfere with LAMP as long as you are running them using a different port number.

For example, Below is a simple NodeJS app that is listening on port 3000 and will serve the page index.html using that port, At the same time Apache can still serve web pages using port 80 and as long as the ports don't clash you shouldn't have any issues with running both services.

var app = require('express')();
var http = require('http').Server(app);
var util = require('util')

var port = 3000;

app.get('/', function(req, res) {
    res.sendFile(__dirname + '/index.html')
});

http.listen(port, function() {
    console.log('listening on *:' + port);
});

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .