-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e80d290
Showing
43 changed files
with
103,723 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: bin/start-nginx node web.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# this file is used by the nginx.conf | ||
|
||
types { | ||
text/html html htm shtml; | ||
text/css css; | ||
text/xml xml rss; | ||
image/gif gif; | ||
image/jpeg jpeg jpg; | ||
application/javascript js; | ||
application/atom+xml atom; | ||
|
||
text/cache-manifest manifest appcache; | ||
text/mathml mml; | ||
text/plain txt; | ||
text/vnd.sun.j2me.app-descriptor jad; | ||
text/vnd.wap.wml wml; | ||
text/x-component htc; | ||
|
||
image/png png; | ||
image/svg+xml svg svgz; | ||
image/tiff tif tiff; | ||
image/vnd.wap.wbmp wbmp; | ||
image/webp webp; | ||
image/x-icon ico; | ||
image/x-jng jng; | ||
image/x-ms-bmp bmp; | ||
|
||
application/java-archive jar war ear; | ||
application/mac-binhex40 hqx; | ||
application/msword doc; | ||
application/pdf pdf; | ||
application/postscript ps eps ai; | ||
application/rtf rtf; | ||
application/vnd.ms-excel xls; | ||
application/vnd.ms-powerpoint ppt; | ||
application/vnd.wap.wmlc wmlc; | ||
application/vnd.wap.xhtml+xml xhtml; | ||
application/x-chrome-extension crx; | ||
application/x-cocoa cco; | ||
application/x-java-archive-diff jardiff; | ||
application/x-java-jnlp-file jnlp; | ||
application/x-makeself run; | ||
application/x-perl pl pm; | ||
application/x-pilot prc pdb; | ||
application/x-rar-compressed rar; | ||
application/x-redhat-package-manager rpm; | ||
application/x-sea sea; | ||
application/x-shockwave-flash swf; | ||
application/x-stuffit sit; | ||
application/x-tcl tcl tk; | ||
application/x-x509-ca-cert der pem crt; | ||
application/x-xpinstall xpi; | ||
application/zip zip; | ||
|
||
application/octet-stream bin exe dll; | ||
application/octet-stream deb; | ||
application/octet-stream dmg; | ||
application/octet-stream iso img; | ||
application/octet-stream msi msp msm; | ||
application/octet-stream safariextz | ||
|
||
audio/midi mid midi kar; | ||
audio/mpeg mp3; | ||
audio/x-realaudio ra; | ||
audio/ogg oga ogg; | ||
|
||
video/3gpp 3gpp 3gp; | ||
video/mpeg mpeg mpg; | ||
video/ogg ogv; | ||
video/quicktime mov; | ||
video/webm webm; | ||
video/x-flv flv; | ||
video/x-mng mng; | ||
video/x-ms-asf asx asf; | ||
video/x-ms-wmv wmv; | ||
video/x-msvideo avi; | ||
|
||
application/vnd.ms-fontobject eot; | ||
font/truetype ttf; | ||
font/opentype otf; | ||
font/woff woff; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
daemon off; | ||
#Heroku dynos have at least 4 cores. | ||
worker_processes <%= ENV['NGINX_WORKERS'] || 4 %>; | ||
|
||
events { | ||
use epoll; | ||
accept_mutex on; | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
|
||
keepalive_timeout 65; | ||
gzip on; | ||
gzip_http_version 1.0; | ||
gzip_comp_level 2; | ||
gzip_min_length 1100; | ||
gzip_buffers 4 8k; | ||
gzip_proxied any; | ||
gzip_types | ||
# text/html is always compressed by HttpGzipModule | ||
text/css | ||
text/javascript | ||
text/xml | ||
text/plain | ||
text/x-component | ||
application/javascript | ||
application/xml | ||
application/rss+xml | ||
font/truetype | ||
font/opentype | ||
application/vnd.ms-fontobject | ||
image/svg+xml; | ||
|
||
#gzip_static on; | ||
|
||
#gzip_proxied expired no-cache no-store private auth; | ||
#gzip_disable "MSIE [1-6]\."; | ||
#gzip_vary on; | ||
|
||
include mime.types; | ||
default_type application/octet-stream; | ||
|
||
proxy_cache_path /tmp/nginx levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=60m; | ||
proxy_cache_key "$scheme$request_method$request_uri"; | ||
|
||
|
||
log_format l2met 'measure#nginx.service=$request_time request_id=$http_x_request_id'; | ||
access_log logs/nginx/access.log l2met; | ||
error_log logs/nginx/error.log; | ||
|
||
sendfile on; | ||
|
||
#Must read the body in 5 seconds. | ||
client_body_timeout 5; | ||
|
||
upstream app_server { | ||
server unix:/tmp/nginx.socket fail_timeout=0; | ||
} | ||
|
||
server { | ||
listen <%= ENV["PORT"] %>; | ||
server_name _; | ||
keepalive_timeout 5; | ||
|
||
error_page 404 403 /404.html; | ||
root <%= ENV['HOME'] %>/public; | ||
|
||
proxy_cache my_cache; | ||
proxy_cache_valid 200 24h; | ||
|
||
autoindex off; | ||
index svgavatars/svgavatars.html; | ||
|
||
location / { | ||
proxy_pass http://app_server; | ||
} | ||
|
||
location ~* ^.+\.(html|htm|php|html.gz)$ { | ||
add_header Cache-Control "max-age=0, no-cache"; | ||
add_header "X-UA-Compatible" "IE=Edge,chrome=1"; | ||
} | ||
|
||
location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm)$ { | ||
access_log off; | ||
add_header Cache-Control "public, max-age=2592000"; | ||
} | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "face.crypto.camp", | ||
"version": "0.0.1", | ||
"main": "web.js", | ||
"dependencies": { | ||
"express": "3.1.1", | ||
"guid": "0.0.10", | ||
"child-process": "*", | ||
"fs": "*", | ||
"http": "*", | ||
"querystring": "*", | ||
"ethereumjs-abi": "*", | ||
"ethereumjs-util": "*", | ||
"phantomjs": "*", | ||
"guid": "*", | ||
"body-parser": "*", | ||
"html": "*", | ||
"ejs": "*", | ||
"redis": "*" | ||
}, | ||
"engines": { | ||
"node": "6.9.4", | ||
"npm": "4.3.0" | ||
}, | ||
"devDependencies": {} | ||
} |
Oops, something went wrong.