Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.
I've tried to make it as lean and unobtrusive as possible.
errors/AppError.js
| { | |
| "Uber" : "https://eng.uber.com", | |
| "Pinterest" : "https://engineering.pinterest.com/", | |
| "Github" : "https://github.com/blog/category/engineering", | |
| "Reddit" : "http://www.redditblog.com/", | |
| "Oyster" : "http://tech.oyster.com/", | |
| "Cloudera" : "http://blog.cloudera.com/blog/", | |
| "Instagram" : "http://instagram-engineering.tumblr.com/", | |
| "Dropbox" : "https://blogs.dropbox.com/tech/", | |
| "Flicker" : "http://code.flickr.net/", |
This gist assumes:
www-data (may be apache on other systems)| # SSL self signed localhost for rails start to finish, no red warnings. | |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |