发布自己的nodejs的npm包

# mkdir example
# cd example
# npm init

按提示输入信息会自动生成package.json

{ “name”: “example”, “version”: “0.0.1″, “description”: “test npm”, “main”: “index.js”, “scripts”: { “test”: “echo ”Error: no test specified” && exit 1″ }, “repository”: “”, “author”: “”, “license”: “MIT” } Read More

GitLab via Nginx without SSL

upstream gitlab { server unix:/home/git/gitlab/tmp/sockets/gitlab.socket; # server 127.0.0.1:9292; } server { listen 80; server_name git.example.com; server_tokens off; root /home/git/gitlab/public; access_log /var/log/nginx/gitlab_access.log; error_log /var/log/nginx/gitlab_error.log; location / { try_files $uri $uri/index.html $uri.html @gitlab; } location @gitlab { proxy_read_timeout 300; proxy_connect_timeout 300; proxy_redirect off; proxy_set_header X-Forwarded-Proto http; proxy_set_header X-Forwarded-Ssl off; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://gitlab; } } Read More