nodejs(6)
-
livereload가 정상적으로 connection이 일어 나지 않을 경우
livereload가 정상적으로 connection이 일어 나지 않을 경우 1. livereload란 페이지에 변경사항이 발생시 자동으로 새로고침을 해주는 라이브러리다. 2. mean.io 에서 정상적으로 동작하지 않는 경우해당 서버를 grunt가 아닌 nodemon이나 forever 또는 nodejs 자체를 통해 server.js 를 바로 실행시킨 경우grunt에 포함되어진 livereload 서버가 시작되지 않는다. grunt를 통해서 서버를 시작하면 된다.
2014.09.23 -
mean.io 설치 후 처음 접속시 에러가 나올 경우
mean.io 설치 후 처음 접속시 아래와 같은 오류가 나오면서 접속이 종료될 경우 events.js:72 throw er; // Unhandled 'error' event ^Error: ENOENT, open '/project/mean/bower_components/bootstrap/dist/css/bootstrap.css'[nodemon] app crashed - waiting for file changes before starting... 아래와 같이 bower 를 설치한후 인스톨해준다. npm install -g bowerbower install --allow-root
2014.07.16 -
nodejs에서 변경점 발생시 자동으로 서버 재시작 하기
nodejs에서 변경점 발생시 자동으로 서버 재시작 하기 nodejs에서 epxress를 사용해서 코딩을 할 경우 php와는 다르게 상당히 번거로운 점이 소스가 변경될 때 마다 서버를 재시작 해줘야한다는 점이다. 이때는 nodemon 이라는 것으로 서버를 시작할 경우 해당 프로젝트 폴더내에서 파일을 감지하고 있다가 자동으로 서버를 재시작시켜준다 설치방법 npm install nodemon -g 사용법 기존 : node bin/www신규 : nodemon bin/www
2014.06.15 -
npm install express 이후에 express: command not found 라고 나올 경우
npm install express 이후에 express: command not found 라고 나올 경우 sudo npm install -g express-generator@3 출처 : http://cuiborails.wordpress.com/2014/04/30/express-expresscommand-not-found-after-installation-with-npm/
2014.05.02 -
ubuntu 에서 apache2 와 nodejs (express) 를 reverse proxy로 연동하기
ubuntu 에서 apache2 와 nodejs (express) 를 reverse proxy로 연동하기 1. apache 에서 필수모들을 로드한다 a2enmod proxy proxy_http 2. apache 에서 conf 파일 설정 ServerName SITE_URL ProxyPass / http://127.0.0.1:3000/ ProxyPassReverse / http://127.0.0.1:3000/ Order deny,allow Allow from all
2013.07.02 -
nodejs + npm + express 설치
1. nodejs 설치 apt-get install nodejs 2. npm 설치 apt-get install npm 3. express 설치 npm install express -g 4. 프로젝트 생성 express 패키지(폴더)명 5. 패키지 설치 npm install (생성된 폴더내에서 실행) 6. 프로세스 실행 nodejs (또는 node) app.js (기본파일)
2013.07.02