Skip to content

Instantly share code, notes, and snippets.

View Foxandxss's full-sized avatar

Jesús Rodríguez Foxandxss

View GitHub Profile
@Foxandxss
Foxandxss / nginx-vhost
Last active June 12, 2020 07:12 — forked from bartvanremortele/nginx-vhost
Nginx vhost configuration for proxying requests to an API running on a different port. Easy to avoid CORS / JSONP
upstream api_node_js {
server 127.0.0.1:8080;
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/my-kickass-domain/public_html;
index index.html index.htm;
serpIQ.factory('UserAccount', ['$resource', '$timeout', function($resource, $timeout) {
var userResource = $resource('/users/account', {}, {});
var accountInfo = {};
(function pollStatus() {
userResource.get({}, function(response){
accountInfo.foo = {
plan: response.plan,