2018. 1. 31. 12:27
반응형

Meteor 테스트할때, 개발자모드 콘솔에서 바꿔서 바로 실행하고 싶을때,


이건 데이터 샘플 넣을때 쓰는 메소드 불러와서 넣을때 하는법


Meteor.call("메소드명", 입력값, 결과값처리);


Meteor.call("makeFixtureData",Meteor.userId(),function(err,result){console.log(result);});



또는 세션을 변경해서 보고 싶을때는


Session.set("cnt", 30);


Session.set(세션명, 입력값);


이런식으로 실행하면 바로 바뀌는것을 볼수있다.

반응형
Posted by Tyson
2018. 1. 30. 11:27
반응형

집에 컴터에서 작업하던거, 


서버에 띄어서 하고 싶어서,


깃헙에서 가져와서 meteor run를 하는데, 계속 서버가 멈추고, 작업이 안되는거다.


에러가 뜨길래, 보니까, 보니까, 


깃허브에는 모듈들이 없이 소스만 있기때문이다.


그래서, npm를 설치해줘야한다.


폴더에서, 


#> git clone https://github.com/tyson444/meteorStudy.git


git clone 깃허브주소. 위에꺼는 내꺼다.


그리고 폴더들을 보면, node폴더등이 없다.


#> cd meteorStudy               <<meteorStudy 폴더로 이동

#> meteor npm install            << npm설치, 모듈등이 설치된다.

#> meteor run 이러면 뜨는것을 확인할수있다.




반응형
Posted by Tyson
2018. 1. 23. 17:27
반응형

Meteor 설치하기


$curl https://install.meteor.com/ | sh 


하면 자동설치이다.


프로젝트 생성


>meteor create 프로젝트명

>meteor create testProcject


쓰면 끝이다.


근데, 이런 에러가 뜰때가 있다.


npm ERR! code ENOGIT

npm ERR! No git binary found in $PATH

npm ERR! 

npm ERR! Failed using git.

npm ERR! Please check if you have git installed and in your PATH.



이건 git이 설치 안되어서 그런거라...

git을 설치해 줘야한다.


> yum install git 
으로 git을 설치해준다.



루트로 작업 할시 


You are attempting to run Meteor as the 'root' superuser. If you are developing, this is almost certainly

*not* what you want to do and will likely result in incorrect file permissions. However, if you are

running this command in a build process (CI, etc.), or you are absolutely sure you know what you are

doing, set the METEOR_ALLOW_SUPERUSER environment variable or pass --allow-superuser to proceed.


Even with METEOR_ALLOW_SUPERUSER or --allow-superuser, permissions in your app directory will be incorrect

if you ever attempt to perform any Meteor tasks as a normal user. If you need to fix your permissions, run

the following command from the root of your project:


  sudo chown -Rh <username> .meteor/local


이런 문구가 나올수 있다. 


슈퍼유저로 하지 말라는 이야기인데, 


그래도 root로 작업하려면,


meteor create metcongress --allow-superuser


이렇게 해주면 생성할수있다.


반응형
Posted by Tyson