cafe24 에서 nodejs hosting 설정

정보/뉴스

cafe24 에서 nodejs hosting 설정

담운 0 1,769 2019.06.06 16:55

cafe24 에서 nodejs 호스팅을 받을 때, 

SourceTree를 이용한 git 설정방법



1. cafe24 에 가입한 다음 nodejs hosting 서비스를 결제한다. 

  - 유료 : 월 500 원



2. key 생성 

GIT 설치후 git bash 를 이용하여 key를 생성한다. 

ssh-keygen -t rsa -C "XXXXX@gmail.com"


id_rsa : private key : password 필요.

id_rsa.pub : public key 


  2.1. public key는 서버에 등록하고 

        cafe24 > 관리자콘솔 > 호스팅관린 > public key 관리 


  2.2. private key는 로컬에 등록한다. 

        3번 항목 참조 




3. Repository 생성 


SourceTree > 도구 > 옵션 > 일반 > 


SSH 키 : private key를 등록한다. 

SSH 클라이언트 :OpenSSH 로 변경한다. 


SourceTree > 복제/생성 > 저장소 복제 > 소스경로/URL 


http://xxxid@xxxid.cafe24app.com:xxxid_xxxid2


<== 요기선 http를 붙여서 레파지토리를 생성한 다음 4번에서 config 파일을 수정한다. (버그같음)



cf 1. private key 경로가 초기화 되는 버그 있었음. 





4. config 파일 수정 

push/pull 이 자꾸 오류가 발생함. 

설정 > 원격 > 설정파일 편집


url = xxxid@xxxid.cafe24app.com:xxxid_xxxid2   


http://를 삭제한다. 




web.js 파일을 생성하여 push 함. 


    var http = require('http');


    http.createServer(function(request,response) {

        response.writeHead(200, {'Content-Type': 'text/plain'});

 response.write('Hello JJY PCY !!');

 response.end();

    }).listen(8001);



출처: https://peekaf.tistory.com/65 [To Be Continued...]

Comments

Total 72 Posts, Now 1 Page