일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- HTML #Meta tag
- 캐나다이민 #캘거리 #PGWP #유학후이민
- jiffy #in a jiffy #soon
- 아케이드 #Arcade #
- 캐나다부동산
- 캐나다이민 #캘거리 #알버타 #BVC
- 2020년 결산 #주식 #삼성전기 #삼성전자 #다나와
- ESL #유스호스텔 #캘거리 #Calgary Library Service #캐나다
- SVN #CVS #Sourse Safe #형상관리
- html5
- 오락실게임 #추억의 게임 #월강보합 #Pnadora #레트로시티
- 주식투자 #캐나다 #캐나다주식 # ETF #BMO #Vanguard #iShares #증권계좌
- 캐나다이민 #유학후이민 #캘거리 #입국심사 #캐나다
- 1bed
- HTML5 #생산성
- iphone 재활용
- Data Annotation #데이터 라벨링 #크라우드웍스 #crowdworks #AI
- 아파치 #node.js 연동 #리눅스
- Brendan Eich
- PGWP #캐나다이민 #캘거리
- C#
- 인명사전
- 개발자
- 개발자어록
- ping #ping us #ping 의미
- Modern javascript #ES6
- Bragg Creek #캘거리에서 갈만한곳 #피크닉장소 #알버타 #Forget me not
- 캐나다 동부 #온타리오 #주이동 #이직 #IT취업 #해외취업 #온타리오
- Anders Hejsberg
- 토론토부동산
- Today
- Total
캐나다 전산실 근무자
[리눅스 환경] How to install Node.js on a VPS or a Dedicated server (e.g. 김치하우스 캘거리) 본문
[리눅스 환경] How to install Node.js on a VPS or a Dedicated server (e.g. 김치하우스 캘거리)
모데라투스 2020. 10. 26. 12:54아시는 분의 Portfolio 용 사이트를 공동 작업하는 과정에서, Apche 와 Node.js를 연동해야 하는 상황 발생
1. Node 와 npm 버전 확인
a) node --version : v12.19.0
b) npm --version : 6.14.8
2. Node.js apps 실행
- To run a Node.js application that is production-ready and has a package.json file included,
you can use the following command:
nohup npm start --production &
--> 여기서 nohup 명령어는 HUP 시그널을 무시시켜서 백그라운 프로세스 실행을 가능하게 한다고 한다.
- Node.js app 이 packag.json 파일을 포함하고 있지 않는 경우에는:
nohup node my_app.js &
3. Connect your Website with a Running Node.js App
- 김치하우스 웹사이트는 VPS에 호스팅되어 있는데, cPanel 이라는 web hosting control panel이 제공되고 있다.
cPanel 상에서 설정 파일을 수정하는 방법을 구글링 해서 찾아야 했다.
1) Go to File Manager --> public_html folder
2) Hidden file 볼 수 있게 설정 확인
- Setting buton on the upper-right
3) .htaccess file 수정 : replace XXXXX with the port your Node.js application is working on.
DirectoryIndex disabled
RewriteEngine On RewriteRule ^$ http://127.0.0.1:XXXXX/ [P,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://127.0.0.1:XXXXX/$1 [P,L]
4. How to stop an appplication
pkill node
'개발관련-이것저것' 카테고리의 다른 글
배경- Modern Javascript (0) | 2020.12.24 |
---|---|
Github opensource 참여하기 (0) | 2020.07.30 |
Writing Meaningful Git Commit Messages (0) | 2019.02.20 |
Web API (0) | 2019.01.08 |
SourceTree 에서 특정 파일 커밋 제외시키기 (0) | 2018.06.20 |