<./>.dev./hood

[root@localhost ~]# curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash -
[root@localhost ~]# yum install nodejs

[root@localhost ~]# node -v

[root@localhost ~]# npm -v

[root@localhost ~]# cd /a/b/c/d/e move to directory

[root@localhost sample]# express --view=ejs sample

[root@localhost sample]# npm install express-generator -g

[root@localhost sample]# npm install express

[root@localhost sample]# npm install ejs

[root@localhost sample]# npm install forever

const express = require('express');
const app = express();

app.get('/', function (req, res){
res.send('Hello World');
});

var server = app.listen(3000, function(){
var host = server.address().address;
var port = server.address().port;

console.log('Server is working : port - ', port);
});

[root@localhost sample]# vi /etc/sysconfig/iptables open port 3000



참고 자료 -

https://playon.tistory.com/84
https://blog.work6.kr/515
https://araikuma.tistory.com/454
https://www.deok.me/entry/NodeJS-NodeJS-Express-%EC%84%A4%EC%B9%98-%EB%B0%8F-%EC%84%9C%EB%B9%84%EC%8A%A4-%EA%B0%9C%EB%B0%9C-%EC%8B%9C%EC%9E%91%ED%95%98%EA%B8%B0


참고 자료 -

http://www.krizna.com/centos/installing-node-js-centos-6-sample-app/

http://devsw.tistory.com/137

http://one2many.tistory.com/27


삭제 NPM -

http://stackoverflow.com/questions/19106284/how-do-you-uninstall-all-dependencies-listed-in-package-json-npm