Skip to content

Instantly share code, notes, and snippets.

@denchistyakov
Created December 18, 2013 07:22
Show Gist options
  • Save denchistyakov/8018562 to your computer and use it in GitHub Desktop.
Save denchistyakov/8018562 to your computer and use it in GitHub Desktop.
dev::
@if [ -f ./.init.sh ]; then echo "'make init' must be runned before 'make dev'" ; exit 1 ; fi
@if [ ! `$(id -u)` == "0" ] && [ ! `groups | grep -o "www-data"` ]; then echo "You must be in www-data group to run 'make dev' (or root)" ; echo "To add yourself in www-data type:"; echo "sudo usermod -a -G www-data $(USER)"; echo "After that logout and login. You should see www-data in output of 'groups' command" exit 1 ; fi
@if [ "$(INRIGHTDIR)" == "" ]; then echo "Project should be developed at /home/$(USER)/www/{PROJECTNAME}" ; exit 1 ; fi
npm install --registry=http://npm.yandex-team.ru
@(cd server ; \
npm install --registry=http://npm.yandex-team.ru ; \
chmod 0775 configs ; \
chmod 0777 run ; )
@(cd static ; \
npm install --registry=http://npm.yandex-team.ru ; \
./node_modules/.bin/bower install --allow-root ; \
./node_modules/.bin/enb make ; \
)
@echo "Don't forget to install nginx configs (make enable-dev-nginx) and start server."
@echo "Site should be available at http://{PROJECTNAME}.$(USER).nodejs.dev.spec.yandex.ru/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment